summaryrefslogtreecommitdiff
path: root/goodix_brl_hw.c
diff options
context:
space:
mode:
authorRavi Jain <raviajain@google.com>2022-12-01 13:14:26 +0800
committerRavi Jain <raviajain@google.com>2022-12-06 14:28:55 +0800
commitbc74187e4a8dec8eb34e6ebd660c424edc0f31cd (patch)
treed3f28218759d639fd7da9e64a48b535a02af9d20 /goodix_brl_hw.c
parent33d4c9c4c1891b77ba052926a7b9fb0971080b36 (diff)
downloadgoodix_touch-bc74187e4a8dec8eb34e6ebd660c424edc0f31cd.tar.gz
touch: goodix: Fix deadlock between irq and wakelock
1. Use of disable_irq_nosync instead of disable_irq. 2. Add Error handling while obtaining irq_wakelock. Test: Flashed locally to test resume/suspend operations. Bug: 230827813 Change-Id: Icf0e6ce80c9b5e9e3b95c9f8d4debf1163b69843 Signed-off-by: Ravi Jain <raviajain@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r--goodix_brl_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c
index c423674..1e3bc1a 100644
--- a/goodix_brl_hw.c
+++ b/goodix_brl_hw.c
@@ -344,7 +344,7 @@ static int brl_irq_enable(struct goodix_ts_core *cd, bool enable)
}
if (!enable && atomic_cmpxchg(&cd->irq_enabled, 1, 0)) {
- disable_irq(cd->irq);
+ disable_irq_nosync(cd->irq);
ts_debug("Irq disabled");
return 0;
}