mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-14 17:40:41 +09:00
Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop
This commit is contained in:
@@ -839,8 +839,33 @@ CONFIG_MODEM_ROCKCHIP_DEMO=y
|
||||
# Motion Sensors Support
|
||||
#
|
||||
# CONFIG_MPU_NONE is not set
|
||||
# CONFIG_SENSORS_MPU3050 is not set
|
||||
# CONFIG_SENSORS_MPU6000 is not set
|
||||
CONFIG_MPU_SENSORS_MPU3050=y
|
||||
# CONFIG_MPU_SENSORS_MPU6000 is not set
|
||||
# CONFIG_MPU_SENSORS_ACCELEROMETER_NONE is not set
|
||||
# CONFIG_MPU_SENSORS_ADXL346 is not set
|
||||
# CONFIG_MPU_SENSORS_BMA150 is not set
|
||||
# CONFIG_MPU_SENSORS_BMA222 is not set
|
||||
# CONFIG_MPU_SENSORS_KXSD9 is not set
|
||||
CONFIG_MPU_SENSORS_KXTF9=y
|
||||
# CONFIG_MPU_SENSORS_LIS331DLH is not set
|
||||
# CONFIG_MPU_SENSORS_LIS3DH is not set
|
||||
# CONFIG_MPU_SENSORS_LSM303DLHA is not set
|
||||
# CONFIG_MPU_SENSORS_MMA8450 is not set
|
||||
# CONFIG_MPU_SENSORS_MMA845X is not set
|
||||
CONFIG_MPU_SENSORS_COMPASS_NONE=y
|
||||
# CONFIG_MPU_SENSORS_AK8975 is not set
|
||||
# CONFIG_MPU_SENSORS_MMC314X is not set
|
||||
# CONFIG_MPU_SENSORS_AMI30X is not set
|
||||
# CONFIG_MPU_SENSORS_AMI306 is not set
|
||||
# CONFIG_MPU_SENSORS_HMC5883 is not set
|
||||
# CONFIG_MPU_SENSORS_LSM303DLHM is not set
|
||||
# CONFIG_MPU_SENSORS_YAS529 is not set
|
||||
# CONFIG_MPU_SENSORS_YAS530 is not set
|
||||
# CONFIG_MPU_SENSORS_HSCDTD002B is not set
|
||||
# CONFIG_MPU_SENSORS_HSCDTD004A is not set
|
||||
CONFIG_MPU_SENSORS_PRESSURE_NONE=y
|
||||
# CONFIG_MPU_SENSORS_BMA085 is not set
|
||||
CONFIG_MPU_SENSORS_TIMERIRQ=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
|
||||
152
arch/arm/mach-rk29/board-rk29phonepadsdk.c
Executable file → Normal file
152
arch/arm/mach-rk29/board-rk29phonepadsdk.c
Executable file → Normal file
@@ -60,6 +60,7 @@
|
||||
|
||||
#include <linux/goodix_touch.h>
|
||||
|
||||
#include <linux/mpu.h>
|
||||
#ifdef CONFIG_VIDEO_RK29
|
||||
/*---------------- Camera Sensor Macro Define Begin ------------------------*/
|
||||
/*---------------- Camera Sensor Configuration Macro Begin ------------------------*/
|
||||
@@ -538,6 +539,69 @@ struct nas_platform_data nas_info = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_LAIBAO_TS)
|
||||
#define TOUCH_RESET_PIN RK29_PIN4_PD5//RK29_PIN6_PC3
|
||||
#define TOUCH_INT_PIN RK29_PIN0_PA2
|
||||
void laibao_reset(void)
|
||||
{
|
||||
msleep(5);
|
||||
gpio_pull_updown(TOUCH_INT_PIN, 1);
|
||||
gpio_direction_output(TOUCH_RESET_PIN, 0);
|
||||
msleep(5);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
|
||||
msleep(200);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
|
||||
}
|
||||
void laibao_hold(void)
|
||||
{
|
||||
printk("nas_hold()\n");
|
||||
gpio_direction_output(TOUCH_RESET_PIN, 0);
|
||||
msleep(5);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
|
||||
msleep(30);
|
||||
}
|
||||
void laibao_request_io(void)
|
||||
{
|
||||
if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){
|
||||
gpio_free(TOUCH_RESET_PIN);
|
||||
printk("nas_init_platform_hw gpio_request error\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if(gpio_request(TOUCH_INT_PIN,NULL) != 0){
|
||||
gpio_free(TOUCH_INT_PIN);
|
||||
printk("nas_init_platform_hw gpio_request error\n");
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
int laibao_init_platform_hw(void)
|
||||
{
|
||||
printk("enter %s()\n", __FUNCTION__);
|
||||
laibao_request_io();
|
||||
laibao_reset();
|
||||
|
||||
if(gpio_request(RK29_PIN6_PD3,NULL) != 0){
|
||||
gpio_free(RK29_PIN6_PD3);
|
||||
printk("mma8452_init_platform_hw gpio_request error\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
gpio_direction_output(RK29_PIN6_PD3, 0);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
struct laibao_platform_data laibao_info = {
|
||||
.model= 1003,
|
||||
.init_platform_hw= laibao_init_platform_hw,
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (CONFIG_D70_L3188A)
|
||||
struct goodix_i2c_rmi_platform_data d70_l3188a_info = {
|
||||
@@ -571,6 +635,57 @@ static struct mma8452_platform_data mma8452_info = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_MPU_SENSORS_MPU3050)
|
||||
/*mpu3050*/
|
||||
static struct mpu3050_platform_data mpu3050_data = {
|
||||
.int_config = 0x10,
|
||||
//.orientation = { 1, 0, 0,0, -1, 0,0, 0, 1 },
|
||||
//.orientation = { 0, 1, 0,-1, 0, 0,0, 0, -1 },
|
||||
//.orientation = { -1, 0, 0,0, -1, 0,0, 0, -1 },
|
||||
.orientation = { 1, 0, 0, 0, 1, 0, 0, 0, -1 },
|
||||
.level_shifter = 0,
|
||||
#if defined (CONFIG_MPU_SENSORS_KXTF9)
|
||||
.accel = {
|
||||
#ifdef CONFIG_MPU_SENSORS_MPU3050_MODULE
|
||||
.get_slave_descr = NULL ,
|
||||
#else
|
||||
.get_slave_descr = get_accel_slave_descr ,
|
||||
#endif
|
||||
.adapt_num = 0, // The i2c bus to which the mpu device is
|
||||
// connected
|
||||
.irq = RK29_PIN0_PA3,
|
||||
.bus = EXT_SLAVE_BUS_SECONDARY, //The secondary I2C of MPU
|
||||
.address = 0x0f,
|
||||
//.orientation = { 1, 0, 0,0, 1, 0,0, 0, 1 },
|
||||
//.orientation = { 0, -1, 0,-1, 0, 0,0, 0, -1 },
|
||||
//.orientation = { 0, 1, 0,1, 0, 0,0, 0, -1 },
|
||||
|
||||
.orientation = { 1, 0, 0, 0, -1, 0, 0, 0, -1 },
|
||||
//.orientation = { 0, 1, 0, -1, 0, 0, 0, 0, -1 },
|
||||
},
|
||||
#endif
|
||||
#if defined (CONFIG_MPU_SENSORS_AK8975)
|
||||
.compass = {
|
||||
#ifdef CONFIG_MPU_SENSORS_MPU3050_MODULE
|
||||
.get_slave_descr = NULL,/*ak5883_get_slave_descr,*/
|
||||
#else
|
||||
.get_slave_descr = get_compass_slave_descr,
|
||||
#endif
|
||||
.adapt_num = 0, // The i2c bus to which the compass device is.
|
||||
// It can be difference with mpu
|
||||
// connected
|
||||
.irq = RK29_PIN0_PA4,
|
||||
.bus = EXT_SLAVE_BUS_PRIMARY,
|
||||
.address = 0x0d,
|
||||
//.orientation = { -1, 0, 0,0, -1, 0,0, 0, 1 },
|
||||
//.orientation = { 0, -1, 0,-1, 0, 0,0, 0, -1 },
|
||||
//.orientation = { 0, 1, 0,1, 0, 0,0, 0, -1 },
|
||||
.orientation = { 1, 0, 0, 0, -1, 0, 0, 0, -1 },
|
||||
},
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_BATTERY_BQ27510)
|
||||
#define DC_CHECK_PIN RK29_PIN4_PA1
|
||||
#define LI_LION_BAT_NUM 2
|
||||
@@ -819,6 +934,16 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
|
||||
.irq = RK29_PIN0_PA4,
|
||||
},
|
||||
#endif
|
||||
/*mpu3050*/
|
||||
#if defined (CONFIG_MPU_SENSORS_MPU3050)
|
||||
{
|
||||
.type = "mpu3050",
|
||||
.addr = 0x68,
|
||||
.flags = 0,
|
||||
.irq = RK29_PIN5_PA3,
|
||||
.platform_data = &mpu3050_data,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -831,14 +956,6 @@ static struct i2c_board_info __initdata board_i2c1_devices[] = {
|
||||
.flags = 0,
|
||||
},
|
||||
#endif
|
||||
#if defined (CONFIG_ANX7150) || defined (CONFIG_ANX7150_NEW)
|
||||
{
|
||||
.type = "anx7150",
|
||||
.addr = 0x39, //0x39, 0x3d
|
||||
.flags = 0,
|
||||
.irq = RK29_PIN1_PD7,
|
||||
},
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -876,6 +993,16 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = {
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_LAIBAO_TS)
|
||||
{
|
||||
.type = "laibao_touch",
|
||||
.addr = (0x70>>1),
|
||||
.flags = 0,
|
||||
.irq = RK29_PIN0_PA2,//gpio_to_irq(RK29_PIN0_PA2),
|
||||
.platform_data = &laibao_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_D70_L3188A)
|
||||
{
|
||||
.type = "goodix-ts",
|
||||
@@ -890,6 +1017,15 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = {
|
||||
|
||||
#ifdef CONFIG_I2C3_RK29
|
||||
static struct i2c_board_info __initdata board_i2c3_devices[] = {
|
||||
#if defined (CONFIG_ANX7150) || defined (CONFIG_ANX7150_NEW)
|
||||
{
|
||||
.type = "anx7150",
|
||||
.addr = 0x39, //0x39, 0x3d
|
||||
.flags = 0,
|
||||
.irq = RK29_PIN1_PD7,
|
||||
},
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
10
arch/arm/mach-rk29/include/mach/board.h
Executable file → Normal file
10
arch/arm/mach-rk29/include/mach/board.h
Executable file → Normal file
@@ -280,6 +280,16 @@ struct nas_platform_data {
|
||||
};
|
||||
|
||||
|
||||
struct laibao_platform_data {
|
||||
u16 model;
|
||||
|
||||
int (*get_pendown_state)(void);
|
||||
int (*init_platform_hw)(void);
|
||||
int (*laibao_platform_sleep)(void);
|
||||
int (*laibao_platform_wakeup)(void);
|
||||
void (*exit_platform_hw)(void);
|
||||
};
|
||||
|
||||
struct akm8975_platform_data {
|
||||
char layouts[3][3];
|
||||
char project_name[64];
|
||||
|
||||
6
drivers/input/touchscreen/Kconfig
Executable file → Normal file
6
drivers/input/touchscreen/Kconfig
Executable file → Normal file
@@ -733,6 +733,12 @@ config TOUCHSCREEN_NAS
|
||||
code includes that in its table of I2C devices.
|
||||
|
||||
If unsure, say N (but it's safe to say "Y").
|
||||
|
||||
config LAIBAO_TS
|
||||
tristate "LAIBAO touchscreen"
|
||||
depends on I2C2_RK29
|
||||
help
|
||||
RK29 LAIBAO touchscreen
|
||||
|
||||
config TOUCHSCREEN_GT801_IIC
|
||||
tristate "GT801_IIC based touchscreens"
|
||||
|
||||
@@ -60,3 +60,4 @@ obj-$(CONFIG_D70_L3188A) += goodix_touch.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_FT5406) += ft5406_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_GT819) += gt819.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_NAS) += nas_ts.o
|
||||
obj-$(CONFIG_LAIBAO_TS) += ft5x0x_i2c_ts.o
|
||||
|
||||
1024
drivers/input/touchscreen/ft5x0x_i2c_ts.c
Normal file
1024
drivers/input/touchscreen/ft5x0x_i2c_ts.c
Normal file
File diff suppressed because it is too large
Load Diff
121
drivers/input/touchscreen/ft5x0x_i2c_ts.h
Normal file
121
drivers/input/touchscreen/ft5x0x_i2c_ts.h
Normal file
@@ -0,0 +1,121 @@
|
||||
#ifndef __LINUX_FT5X0X_TS_H__
|
||||
#define __LINUX_FT5X0X_TS_H__
|
||||
|
||||
//#define CONFIG_SUPPORT_FTS_CTP_UPG
|
||||
#define CONFIG_FTS_CUSTOME_ENV
|
||||
|
||||
#define CFG_DBG_DUMMY_INFO_SUPPORT 1 //output touch point information
|
||||
#define CFG_DBG_FUCTION_INFO_SUPPORT 0 //output fouction name
|
||||
#define CFG_DBG_INPUT_EVENT 0 //debug input event
|
||||
|
||||
|
||||
#define CFG_MAX_POINT_NUM 0x5 //max touch points supported
|
||||
#define CFG_NUMOFKEYS 0x4 //number of touch keys
|
||||
|
||||
#ifdef CONFIG_FTS_CUSTOME_ENV
|
||||
#define SCREEN_MAX_X 1024
|
||||
#define SCREEN_MAX_Y 600
|
||||
#else
|
||||
#define SCREEN_MAX_X 800
|
||||
#define SCREEN_MAX_Y 480
|
||||
#endif
|
||||
#define PRESS_MAX 255
|
||||
|
||||
#define KEY_PRESS 0x1
|
||||
#define KEY_RELEASE 0x0
|
||||
|
||||
#define FT5X0X_NAME "laibao_touch"//"ft5x0x_ts"
|
||||
|
||||
#define FTS_NULL 0x0
|
||||
#define FTS_TRUE 0x1
|
||||
#define FTS_FALSE 0x0
|
||||
#define I2C_CTPM_ADDRESS 0x70
|
||||
|
||||
typedef unsigned char FTS_BYTE;
|
||||
typedef unsigned short FTS_WORD;
|
||||
typedef unsigned int FTS_DWRD;
|
||||
typedef unsigned char FTS_BOOL;
|
||||
|
||||
|
||||
|
||||
typedef struct _REPORT_FINGER_INFO_T
|
||||
{
|
||||
short ui2_id; /* ID information, from 0 to CFG_MAX_POINT_NUM - 1*/
|
||||
short u2_pressure; /* ***pressure information, valid from 0 -63 **********/
|
||||
short i2_x; /*********** X coordinate, 0 - 2047 ****************/
|
||||
short i2_y; /* **********Y coordinate, 0 - 2047 ****************/
|
||||
} REPORT_FINGER_INFO_T;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ERR_OK,
|
||||
ERR_MODE,
|
||||
ERR_READID,
|
||||
ERR_ERASE,
|
||||
ERR_STATUS,
|
||||
ERR_ECC,
|
||||
ERR_DL_ERASE_FAIL,
|
||||
ERR_DL_PROGRAM_FAIL,
|
||||
ERR_DL_VERIFY_FAIL
|
||||
}E_UPGRADE_ERR_TYPE;
|
||||
|
||||
|
||||
struct FTS_TS_EVENT_T {
|
||||
short x1;
|
||||
short y1;
|
||||
short x2;
|
||||
short y2;
|
||||
short x3;
|
||||
short y3;
|
||||
short x4;
|
||||
short y4;
|
||||
short x5;
|
||||
short y5;
|
||||
short pressure1;
|
||||
short pressure2;
|
||||
short pressure3;
|
||||
short pressure4;
|
||||
short pressure5;
|
||||
u8 touch_point;
|
||||
};
|
||||
|
||||
struct FTS_TS_DATA_T {
|
||||
struct input_dev *input_dev;
|
||||
struct FTS_TS_EVENT_T event;
|
||||
struct work_struct pen_event_work;
|
||||
struct workqueue_struct *ts_workqueue;
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum ft5x0x_ts_regs {
|
||||
FT5X0X_REG_THRES = 0x80, /* Thresshold, the threshold be low, the sensitivy will be high */
|
||||
FT5X0X_REG_REPORT_RATE = 0x88, /* **************report rate, in unit of 10Hz **************/
|
||||
FT5X0X_REG_PMODE = 0xA5, /* Power Consume Mode 0 -- active, 1 -- monitor, 3 -- sleep */
|
||||
FT5X0X_REG_FIRMID = 0xA6, /* ***************firmware version **********************/
|
||||
FT5X0X_REG_NOISE_MODE = 0xb2 /* to enable or disable power noise, 1 -- enable, 0 -- disable */
|
||||
};
|
||||
|
||||
#define PMODE_ACTIVE 0x00
|
||||
#define PMODE_MONITOR 0x01
|
||||
#define PMODE_STANDBY 0x02
|
||||
#define PMODE_HIBERNATE 0x03
|
||||
|
||||
|
||||
#ifndef ABS_MT_TOUCH_MAJOR
|
||||
#define ABS_MT_TOUCH_MAJOR 0x30 /* touching ellipse */
|
||||
#define ABS_MT_TOUCH_MINOR 0x31 /* (omit if circular) */
|
||||
#define ABS_MT_WIDTH_MAJOR 0x32 /* approaching ellipse */
|
||||
#define ABS_MT_WIDTH_MINOR 0x33 /* (omit if circular) */
|
||||
#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */
|
||||
#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
|
||||
#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
|
||||
#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
|
||||
#define ABS_MT_BLOB_ID 0x38 /* Group set of pkts as blob */
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user