diff options
author | Super Liu <supercjliu@google.com> | 2022-10-27 06:14:58 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2022-10-27 06:26:52 +0000 |
commit | d857db58fe9a3d4f7e7ca74d880f362f1480da80 (patch) | |
tree | 8ab6677a25968c5c5ec3080f3bc5020070fd49d8 | |
parent | 9f6a34bcedb0993e5652a678c5c01781bd66a15c (diff) | |
download | novatek_touch-d857db58fe9a3d4f7e7ca74d880f362f1480da80.tar.gz |
touch/novatek: clear stylus context info for offload when suspend.
Bug: 203628075
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: I504a2f16e2b29e5174d8f1455ba80231624eecf2
-rw-r--r-- | nt36xxx/nt36xxx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nt36xxx/nt36xxx.c b/nt36xxx/nt36xxx.c index 2c9a706..bc69eec 100644 --- a/nt36xxx/nt36xxx.c +++ b/nt36xxx/nt36xxx.c @@ -2951,6 +2951,11 @@ int nvt_ts_suspend(struct device *dev) input_report_key(ts->pen_input_dev, BTN_STYLUS, 0); input_report_key(ts->pen_input_dev, BTN_STYLUS2, 0); input_sync(ts->pen_input_dev); + + ts->pen_active = 0; + ts->pen_offload_coord_timestamp = ts->timestamp; + memset(&ts->pen_offload_coord, 0, + sizeof(ts->pen_offload_coord)); } #if (WAKEUP_GESTURE) && (NVT_TOUCH_EXT_API) |