Skip to content

Commit

Permalink
update firmware for new TP panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Given He authored and csjamesdeng committed Sep 29, 2018
1 parent 1aaae59 commit ff98af5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 30 deletions.
17 changes: 4 additions & 13 deletions drivers/input/touchscreen/gt9xx/gt9xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int exchange_x_y_flag = 0;
static __u32 twi_id = 0;
static char irq_pin_name[8];

static u32 debug_mask = 255;
static u32 debug_mask = 0;

enum{
DEBUG_INIT = 1U << 0,
Expand Down Expand Up @@ -429,9 +429,9 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
//GTP_ERROR("source data:ID:%d, X:%d, Y:%d, W:%d\n", id, x, y, w);
//printk("=================gtp_touch_down-- joey_parking = %d\n", joey_parking);

//if(1 == exchange_x_y_flag){
// swap(x, y);
//}
if(1 == exchange_x_y_flag){
swap(x, y);
}

if(1 == revert_x_flag){
x = SCREEN_MAX_X - x;
Expand All @@ -440,10 +440,6 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
if(1 == revert_y_flag){
y = SCREEN_MAX_Y - y;
}

if(1 == exchange_x_y_flag){
swap(x, y);
}

dprintk(DEBUG_X_Y_INFO,"report data:ID:%d, X:%d, Y:%d, W:%d\n", id, x, y, w);

Expand Down Expand Up @@ -1430,11 +1426,6 @@ static int ctp_get_system_config(void)
revert_x_flag = config_info.revert_x_flag;
revert_y_flag = config_info.revert_y_flag;
exchange_x_y_flag = config_info.exchange_x_y_flag;
//screen_max_x = 1280;
//screen_max_y = 720;
//revert_x_flag = 1;
//revert_y_flag = 1;
//exchange_x_y_flag = 0;

//printk("===========screen_max_x = %d\n",screen_max_x);
//printk("===========screen_max_y = %d\n",screen_max_y);
Expand Down
36 changes: 19 additions & 17 deletions drivers/input/touchscreen/gt9xx/gt9xx_ts.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,23 +223,25 @@ a sample config, send this config should cause the chip cannot work normally*/
#define CTP_CFG_GROUP5 {0x41,0x00,0x03,0x00,0x04,0x05,0x35,0x00,0x01,0x08,0x28,0x09,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,0x11,0x11,0x04,0x16,0x18,0x1D,0x14,0x8C,0x2E,0x0E,0x5A,0x5C,0x7C,0x06,0x00,0x00,0x00,0x9A,0x02,0x1D,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x87,0x94,0xC5,0x02,0x08,0x00,0x00,0x04,0x97,0x41,0x00,0x8A,0x4C,0x00,0x80,0x5A,0x00,0x78,0x6A,0x00,0x72,0x7C,0x00,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,0x16,0x18,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,0x26,0x28,0x29,0x2A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0x01}
//v5_dvb_gt911_1060_1280x720
#define CTP_CFG_GROUP6 {\
0x5F,0x00,0x05,0xD0,0x02,0x01,0x3D,0x00,0x01,0x08,0x28,\
0x0F,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x18,0x1A,0x1E,0x14,0x86,0x26,0x08,0x3D,0x3B,0x31,\
0x0D,0x00,0x00,0x00,0x21,0x03,0x1D,0x00,0x01,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x5A,0x94,0xC5,\
0x02,0x07,0x00,0x00,0x04,0xB9,0x21,0x00,0x9E,0x29,0x00,\
0x88,0x34,0x00,0x7A,0x41,0x00,0x71,0x51,0x00,0x72,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04,0x02,0xFF,\
0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,\
0x1E,0x1F,0x20,0x21,0x22,0x0A,0x08,0x06,0x04,0x02,0x00,\
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\
0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x01}
0x61,0x00,0x05,0xD0,0x02,0x02,0x3D,0x00,0x01,0x0F,\
0x28,0x0F,0x5A,0x3C,0x03,0x05,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x18,0x1A,0x1E,0x14,0x86,0x26,0x08,\
0x34,0x32,0x0C,0x08,0x00,0x00,0x00,0x40,0x03,0x1D,\
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x1E,0x50,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,\
0xB0,0x21,0x00,0x97,0x28,0x00,0x81,0x31,0x00,0x72,\
0x3B,0x00,0x65,0x48,0x00,0x65,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04,0x02,\
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x0A,0x08,\
0x06,0x04,0x02,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0xCD,0x01}
//s906_opd_gt911_800x480
#define CTP_CFG_GROUP7 {\
}
Expand Down

0 comments on commit ff98af5

Please sign in to comment.