summaryrefslogtreecommitdiff
path: root/goodix_brl_hw.c
diff options
context:
space:
mode:
authorWendly Li <wendlyli@google.com>2022-05-11 04:26:56 +0000
committerWendly Li <wendlyli@google.com>2022-05-24 13:08:44 +0000
commit4d5d4a97a95d7958ba0060212beadd3bb7adffb5 (patch)
tree74b86ae2477b67a780d6cd10686d92b797abd034 /goodix_brl_hw.c
parentf5dc04e05ad88202465c7bfdfa5785975d3e0951 (diff)
downloadgoodix_touch-4d5d4a97a95d7958ba0060212beadd3bb7adffb5.tar.gz
goodix: Import v1.0.8 driver
Bug: 214118837 Test: Check heatmap works Change-Id: Iabf7fcff4183f4bdfae4622765bba795fc8a01a0 Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r--goodix_brl_hw.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c
index e22ce0d..ac61fd5 100644
--- a/goodix_brl_hw.c
+++ b/goodix_brl_hw.c
@@ -985,7 +985,7 @@ static int brl_esd_check(struct goodix_ts_core *cd)
}
#define IRQ_EVENT_HEAD_LEN 8
-#define BYTES_PER_POINT 12
+#define BYTES_PER_POINT 14
#define COOR_DATA_CHECKSUM_SIZE 2
#define GOODIX_TOUCH_EVENT 0x80
@@ -1019,12 +1019,14 @@ static void goodix_parse_finger(
touch_data->coords[id].y = y;
touch_data->coords[id].w = w;
- if (point_struct_len == 12) {
+ if (point_struct_len > 8) {
touch_data->coords[id].p = coor_data[8];
- touch_data->coords[id].major = coor_data[9];
- touch_data->coords[id].minor = coor_data[10];
+ touch_data->coords[id].major =
+ le16_to_cpup((__le16 *)(coor_data + 9));
+ touch_data->coords[id].minor =
+ le16_to_cpup((__le16 *)(coor_data + 11));
touch_data->coords[id].angle =
- (signed char)coor_data[11];
+ (signed char)coor_data[13];
}
coor_data += point_struct_len;
@@ -1178,7 +1180,7 @@ static int brl_event_handler(
int pre_read_len;
int tx = cd->ic_info.parm.drv_num;
int rx = cd->ic_info.parm.sen_num;
- u8 pre_buf[38];
+ u8 pre_buf[100];
u8 event_status;
u32 mutual_addr;
int ret;