summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2023-05-18 06:05:22 +0000
committerSuper Liu <supercjliu@google.com>2023-05-19 00:31:15 +0000
commitcb1ce1fb12115861672af8282416ed591b14b038 (patch)
tree139499b18cf8992f1cdb639afa2cf5a0651234de
parent71028bc91b322fb73d49ac311ec12ac8161fb1a6 (diff)
downloadcommon-cb1ce1fb12115861672af8282416ed591b14b038.tar.gz
Bug: 283181865 Test: check the touch functionality during suspend and resume. Change-Id: I1b33e616d536e194894510c6bedc0d070a7ea0c2 Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r--goog_touch_interface.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c
index 8369505..9741aeb 100644
--- a/goog_touch_interface.c
+++ b/goog_touch_interface.c
@@ -3473,12 +3473,14 @@ static irqreturn_t gti_irq_thread_fn(int irq, void *data)
ATRACE_BEGIN(__func__);
- error = goog_pm_wake_lock(gti, GTI_PM_WAKELOCK_TYPE_IRQ, true);
- if (error < 0) {
- GOOG_WARN(gti, "Skipping stray interrupt, power_status: %d, new power_status: %d\n",
- gti->pm.state, gti->pm.new_state);
- ATRACE_END();
- return IRQ_HANDLED;
+ if (gti->tbn_enabled) {
+ error = goog_pm_wake_lock(gti, GTI_PM_WAKELOCK_TYPE_IRQ, true);
+ if (error < 0) {
+ GOOG_WARN(gti, "Skipping stray interrupt, pm state: (%d, %d)\n",
+ gti->pm.state, gti->pm.new_state);
+ ATRACE_END();
+ return IRQ_HANDLED;
+ }
}
cpu_latency_qos_update_request(&gti->pm_qos_req, 100 /* usec */);
@@ -3501,7 +3503,8 @@ static irqreturn_t gti_irq_thread_fn(int irq, void *data)
gti_debug_hc_update(gti, false);
cpu_latency_qos_update_request(&gti->pm_qos_req, PM_QOS_DEFAULT_VALUE);
- goog_pm_wake_unlock_nosync(gti, GTI_PM_WAKELOCK_TYPE_IRQ);
+ if (gti->tbn_enabled)
+ goog_pm_wake_unlock_nosync(gti, GTI_PM_WAKELOCK_TYPE_IRQ);
ATRACE_END();
return ret;