diff options
author | Super Liu <supercjliu@google.com> | 2023-05-18 06:05:22 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2023-05-19 00:31:27 +0000 |
commit | 737c988d42ef167c0b6946507c720a8345ab620e (patch) | |
tree | 5e5cae0a14443afd6dc300b484e1757d5c718f37 | |
parent | c10070fdbf75e090dbdaf67880d6a494167d87d4 (diff) | |
download | common-737c988d42ef167c0b6946507c720a8345ab620e.tar.gz |
gti: request GTI_PM_WAKELOCK_TYPE_IRQ when TBN enabled
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.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index d3ceb53..895d7ef 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -3743,12 +3743,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(>i->pm_qos_req, 100 /* usec */); @@ -3771,7 +3773,8 @@ static irqreturn_t gti_irq_thread_fn(int irq, void *data) gti_debug_hc_update(gti, false); cpu_latency_qos_update_request(>i->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; |