diff options
author | Robin Peng <robinpeng@google.com> | 2022-10-27 03:36:01 +0000 |
---|---|---|
committer | Robin Peng <robinpeng@google.com> | 2022-10-27 04:13:38 +0000 |
commit | ff572f1246664c83a22053b0c077f4440864da0d (patch) | |
tree | 601f07b18110bcab88f57c4acabf3281f1a4ba31 /goodix_ts_proc.c | |
parent | 29e2ff70ca2ff4ef31705741e6033f212ea2162c (diff) | |
parent | 34930eb579c844a2ecba6c9e54d72907359beb4e (diff) | |
download | goodix_touch-ff572f1246664c83a22053b0c077f4440864da0d.tar.gz |
Merge android13-gs-pixel-5.10-tm-qpr1 into android13-gs-pixel-5.10-tm-qpr2
Bug: 255246572
Change-Id: I386fa3d0252cf608f7caa344a580c1af61e13404
Signed-off-by: Robin Peng <robinpeng@google.com>
Diffstat (limited to 'goodix_ts_proc.c')
-rw-r--r-- | goodix_ts_proc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/goodix_ts_proc.c b/goodix_ts_proc.c index 547b303..7b5bc07 100644 --- a/goodix_ts_proc.c +++ b/goodix_ts_proc.c @@ -3008,7 +3008,7 @@ static void goodix_get_dump_log(void) static void goodix_get_stylus_data(void) { struct goodix_stylus_data stylus_data; - u8 temp_buf[320] = { 0 }; + u8 temp_buf[40] = {0}; u32 flag_addr = cd->ic_info.misc.touch_data_addr; int tx = cd->ic_info.parm.drv_num; int rx = cd->ic_info.parm.sen_num; @@ -3069,11 +3069,10 @@ static void goodix_get_stylus_data(void) angle_y = le16_to_cpup((__le16 *)(temp_buf + 18)) / 100; stylus_struct_addr = cd->ic_info.misc.frame_data_addr + - cd->ic_info.misc.frame_data_head_len + - cd->ic_info.misc.fw_attr_len + - cd->ic_info.misc.fw_log_len; - ret = cd->hw_ops->read( - cd, stylus_struct_addr, temp_buf, sizeof(stylus_data)); + cd->ic_info.misc.frame_data_head_len + + cd->ic_info.misc.fw_attr_len + + cd->ic_info.misc.fw_log_len; + ret = cd->hw_ops->read(cd, stylus_struct_addr, (u8 *)&stylus_data, sizeof(stylus_data)); if (ret < 0) { ts_err("read stylus struct data failed"); goto exit; |