From 95c64638619bbc31d6dca78c36ce6488aa7644f3 Mon Sep 17 00:00:00 2001 From: Weixin Zhou Date: Sat, 21 Nov 2020 16:13:35 +0800 Subject: [PATCH] input: touchscreen: gt9xx: add gt9110 config Signed-off-by: Weixin Zhou Change-Id: Iccde92abac702c755e78920415922fe5d47e455c --- ...T9110P(2020)V71_Config_20201028_170326.cfg | 19 +++++++++++++++++++ drivers/input/touchscreen/gt9xx/gt9xx.c | 17 +++++++++++++++++ drivers/input/touchscreen/gt9xx/gt9xx.h | 1 + drivers/input/touchscreen/gt9xx/gt9xx_cfg.h | 5 +++++ .../input/touchscreen/gt9xx/gt9xx_update.c | 2 +- 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 drivers/input/touchscreen/gt9xx/GT9110P(2020)V71_Config_20201028_170326.cfg diff --git a/drivers/input/touchscreen/gt9xx/GT9110P(2020)V71_Config_20201028_170326.cfg b/drivers/input/touchscreen/gt9xx/GT9110P(2020)V71_Config_20201028_170326.cfg new file mode 100644 index 000000000000..62a3d0e496c6 --- /dev/null +++ b/drivers/input/touchscreen/gt9xx/GT9110P(2020)V71_Config_20201028_170326.cfg @@ -0,0 +1,19 @@ +0x47,0x80,0x07,0xB0,0x04,0x0A,0x7C,0x00,0x01,0x08, +0x28,0x05,0x5A,0x3C,0x03,0x04,0x00,0x00,0x08,0x00, +0x00,0x00,0x00,0x17,0x19,0x1D,0x14,0x95,0x35,0xFF, +0x3C,0x3E,0x0C,0x08,0x00,0x00,0x00,0xBA,0x02,0x2C, +0x17,0x19,0x1B,0x90,0x83,0x32,0x50,0x3C,0x28,0x4A, +0x30,0x32,0x96,0x94,0xC5,0x02,0x07,0x00,0x00,0x04, +0x83,0x38,0x00,0x79,0x45,0x00,0x71,0x57,0x00,0x6B, +0x6C,0x00,0x68,0x87,0x00,0x68,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x03, +0x00,0x48,0x21,0x10,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, +0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11, +0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B, +0x1C,0x1D,0x2A,0x29,0x28,0x27,0x26,0x25,0x24,0x23, +0x22,0x21,0x20,0x1F,0x1E,0x1D,0x1C,0x1B,0x19,0x18, +0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0F,0x0E, +0x0D,0x0C,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05,0x04, +0x03,0x02,0x01,0x00,0x53,0x01 \ No newline at end of file diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.c b/drivers/input/touchscreen/gt9xx/gt9xx.c index 6db7e395f82b..8dcb6965ddc4 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx.c +++ b/drivers/input/touchscreen/gt9xx/gt9xx.c @@ -58,6 +58,7 @@ static u8 m89or101 = TRUE; static u8 bgt911 = FALSE; +static u8 bgt9110 = FALSE; static u8 bgt970 = FALSE; static u8 bgt910 = FALSE; static u8 gtp_change_x2y = TRUE; @@ -1443,6 +1444,10 @@ static s32 gtp_init_panel(struct goodix_ts_data *ts) cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_gt11); } + if (bgt9110) { + send_cfg_buf[0] = gtp_dat_gt9110; + cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_gt9110); + } if (bgt970) { send_cfg_buf[0] = gtp_dat_9_7; cfg_info_len[0] = CFG_GROUP_LEN(gtp_dat_9_7); @@ -2563,6 +2568,12 @@ void gtp_get_chip_type(struct goodix_ts_data *ts) { ts->chip_type = CHIP_TYPE_GT9; } + else if (bgt9110) + { + ts->chip_type = CHIP_TYPE_GT9110; + GTP_INFO("Chip Type: GOODIX_GT9110"); + return; + } else // GT9XXF { ts->chip_type = CHIP_TYPE_GT9F; @@ -2642,6 +2653,12 @@ static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id gtp_change_x2y = TRUE; gtp_x_reverse = FALSE; gtp_y_reverse = TRUE; + } else if (val == 9110) { + m89or101 = FALSE; + bgt9110 = TRUE; + gtp_change_x2y = TRUE; + gtp_x_reverse = TRUE; + gtp_y_reverse = FALSE; } else if (val == 970) { m89or101 = FALSE; bgt911 = FALSE; diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.h b/drivers/input/touchscreen/gt9xx/gt9xx.h index bf390a2c7f53..249d034f29a6 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx.h +++ b/drivers/input/touchscreen/gt9xx/gt9xx.h @@ -95,6 +95,7 @@ typedef enum { CHIP_TYPE_GT9 = 0, CHIP_TYPE_GT9F = 1, + CHIP_TYPE_GT9110 = 2, } CHIP_TYPE_T; #endif diff --git a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h index c667948b165d..7d1924332c39 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h +++ b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h @@ -24,6 +24,11 @@ u8 gtp_dat_gt11[] = { #include "WGJ89006B_GT911_Config_20140625_085816_0X43.cfg" }; +u8 gtp_dat_gt9110[] = { + /* <1200, 1920>*/ + #include "GT9110P(2020)V71_Config_20201028_170326.cfg" +}; + u8 gtp_dat_8_9[] = { /* TODO:Puts your update firmware data here! */ /* <1920, 1200> 8.9 */ diff --git a/drivers/input/touchscreen/gt9xx/gt9xx_update.c b/drivers/input/touchscreen/gt9xx/gt9xx_update.c index 0cfbf11b9a51..8affe60c7fae 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx_update.c +++ b/drivers/input/touchscreen/gt9xx/gt9xx_update.c @@ -879,7 +879,7 @@ static u8 gup_check_update_file(struct i2c_client *client, st_fw_head* fw_head, got_file_flag = 0x00; if (path) { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); + GTP_DEBUG("Update File path:%s, %zu", path, strlen(path)); update_msg.file = filp_open(path, O_RDONLY, 0); if (IS_ERR(update_msg.file))