rk30:update goodix driver from rk29

This commit is contained in:
lw 2012-03-14 10:30:05 +08:00
parent d712633565
commit fbfd114fc2
3 changed files with 45 additions and 26 deletions

View File

@ -116,12 +116,25 @@ config TOUCHSCREEN_ILI2102_IIC
If unsure, say N (but it's safe to say "Y").
config TOUCHSCREEN_GT8XX
tristate "Goodix touch screen gt8xx support"
tristate "Goodix touch screen gt801X2 support for rockchip based platform"
help
Say Y here if you have a touchscreen interface using the
goodix gt8xx , and your board-specific initialization
two goodix gt801 , and your board-specific initialization
code includes that in its table of IIC devices.
If unsure, say N (but it's safe to say "Y").
If unsure, say N.
config TOUCH_MAX_X
int "touch max x resolution"
depends on TOUCHSCREEN_GT8XX
default 1280
help
goodix touch max X resolution
config TOUCH_MAX_Y
int "touch max y resolution"
depends on TOUCHSCREEN_GT8XX
default 800
help
goodix touch max y resolution
config RK28_I2C_TS_NTP070
tristate "NTP070 based touchscreens: NTP070 Interface"

View File

@ -150,27 +150,35 @@ static int goodix_init_panel(struct rk_ts_data *ts)
int ret=-1;
uint8_t rd_cfg_buf[7] = {0x66,};
#ifdef GOODIX_1024X768 //for malata 10.1
uint8_t config_info[] = {
0x65,0x02,0x04,0x00,0x03,0x00,0x0A,0x22,0x1E,0xE7,0x32,0x05,0x08,0x10,0x4C,
0x41,0x41,0x20,0x09,0x00,0xA0,0xA0,0x3C,0x64,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x1D,0x1C,0x1B,0x1A,0x19,0x18,
0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
#if (TS_MAX_X == 1024)&&(TS_MAX_Y == 768) //for malata 10.1
uint8_t config_info[] = {
0x65,0x02,0x04,0x00,0x03,0x00,0x0A,0x22,0x1E,0xE7,0x32,0x05,0x08,0x10,0x4C,
0x41,0x41,0x20,0x09,0x00,0xA0,0xA0,0x3C,0x64,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x1D,0x1C,0x1B,0x1A,0x19,0x18,
0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
#elif (TS_MAX_X == 1280)&&(TS_MAX_Y == 800)
uint8_t config_info[] = {
0x65,0x02,0x05,0x00,0x03,0x20,0x0A,0x22,0x1E,0xE7,0x32,0x05,0x08,0x10,0x4C,
0x41,0x41,0x20,0x07,0x00,0xA0,0xA0,0x46,0x64,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x1D,0x1C,0x1B,0x1A,0x19,0x18,
0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
#else
};*/
uint8_t config_info[] = {
0x65,0x02,0x05,0x00,0x03,0x20,0x0A,0x22,0x1E,0xE7,0x32,0x05,0x08,0x10,0x4C,
0x42,0x42,0x20,0x00,0x00,0x89,0x89,0x3C,0x64,0x0E,0x0D,0x0C,0x0B,
0x0A,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x1D,0x1C,
0x1B,0x1A,0x19,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00
};
uint8_t config_info[] = {
0x65,0x02,0x05,0x00,0x03,0x20,0x0A,0x22,0x1E,0xE7,0x32,0x05,0x08,0x10,0x4C,
0x42,0x42,0x20,0x00,0x00,0x89,0x89,0x3C,0x64,0x0E,0x0D,0x0C,0x0B,
0x0A,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x1D,0x1C,
0x1B,0x1A,0x19,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00
};
#endif
ret=goodix_i2c_write_bytes(ts->client,config_info, (sizeof(config_info)/sizeof(config_info[0])));
if (ret < 0) {

View File

@ -26,10 +26,8 @@
//*************************TouchScreen Work Part*****************************
#define GOODIX_I2C_NAME "Goodix-TS"
#define GOODIX_1024X768 1
#define TS_MAX_X 1024
#define TS_MAX_Y 768
#define TS_MAX_X CONFIG_TOUCH_MAX_X
#define TS_MAX_Y CONFIG_TOUCH_MAX_Y
#if 1
#define INT_PORT RK29_PIN0_PA2