summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2022-12-26 00:31:20 +0000
committerSuper Liu <supercjliu@google.com>2022-12-26 00:31:20 +0000
commit8c9ad3cde7840102d5a8b794e298a69d4e28938c (patch)
treeb2122ebe26f860a612768526912cced1b4c2cf08
parentaf670a799c8981ba4f170e7848c808dca0679577 (diff)
downloadnovatek_touch-8c9ad3cde7840102d5a8b794e298a69d4e28938c.tar.gz
touch/novatek: Skip stray interrupt after screen-off.
Bug: 262796907 Change-Id: I7c520e12201c7de057840a4685ac6a7127f0fb91 Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r--nt36xxx/nt36xxx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nt36xxx/nt36xxx.c b/nt36xxx/nt36xxx.c
index fa6c3dd..018ec3b 100644
--- a/nt36xxx/nt36xxx.c
+++ b/nt36xxx/nt36xxx.c
@@ -1731,6 +1731,17 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
if (!ts->probe_done)
return IRQ_HANDLED;
+ if (ts->bTouchIsAwake == false && ts->irq_enabled == false) {
+#ifdef GOOG_TOUCH_INTERFACE
+ u32 locks = goog_pm_wake_get_locks(ts->gti);
+#else
+ u32 locks = 0;
+#endif
+ NVT_LOG("Skipping stray interrupt, locks %#x wkg_option %#x!\n",
+ locks, ts->wkg_option);
+ return IRQ_HANDLED;
+ }
+
if (ts->wkg_option != WAKEUP_GESTURE_OFF && ts->bTouchIsAwake == false)
pm_wakeup_event(&ts->input_dev->dev, 5 * MSEC_PER_SEC);
else