summaryrefslogtreecommitdiff
path: root/goodix_ts_proc.c
diff options
context:
space:
mode:
authorRavi Jain <raviajain@google.com>2022-09-28 17:16:33 +0800
committerRavi Jain <raviajain@google.com>2022-09-28 17:16:33 +0800
commit34930eb579c844a2ecba6c9e54d72907359beb4e (patch)
tree2341b6a433f0c93ac78de54cde64d5ffcacf3238 /goodix_ts_proc.c
parentd855bc7718664ecea70839575c32f2d7d4e5c0b8 (diff)
downloadgoodix_touch-34930eb579c844a2ecba6c9e54d72907359beb4e.tar.gz
touch: Resolve issues with getting stylus data.
Test: Flashed locally to test. Bug: 248179858 Signed-off-by: Ravi Jain <raviajain@google.com> Change-Id: Iff9510c70e633a3c6cc59b5994f72ac007ab01cc
Diffstat (limited to 'goodix_ts_proc.c')
-rw-r--r--goodix_ts_proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/goodix_ts_proc.c b/goodix_ts_proc.c
index 1cebb46..b8e502f 100644
--- a/goodix_ts_proc.c
+++ b/goodix_ts_proc.c
@@ -2974,7 +2974,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;
@@ -3037,7 +3037,7 @@ static void goodix_get_stylus_data(void)
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));
+ 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;