diff options
author | Wendly Li <wendlyli@google.com> | 2023-01-12 10:23:55 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2023-02-07 11:46:48 +0000 |
commit | 01bc79a67eafe0013dbbb9843301e6e1ba8b97ac (patch) | |
tree | 2c050505ef711f40bdfa24f2508efd09f052db5a /goodix_brl_hw.c | |
parent | bef3cc4215fd8f5074eb3a021995a17b6c559666 (diff) | |
download | goodix_touch-01bc79a67eafe0013dbbb9843301e6e1ba8b97ac.tar.gz |
touch/goodix: Move heatmap read protection to GTI
Bug: 262053705
Bug: 267991839
Test: check heatmap works properly
Change-Id: I1a0dd4dc746037ad4f05e2734e73bce225af5ddd
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r-- | goodix_brl_hw.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c index 1e3bc1a..5e282ad 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_nosync(cd->irq); + disable_irq(cd->irq); ts_debug("Irq disabled"); return 0; } @@ -352,6 +352,15 @@ static int brl_irq_enable(struct goodix_ts_core *cd, bool enable) return 0; } +static int brl_disable_irq_nosync(struct goodix_ts_core *cd) +{ + if (atomic_cmpxchg(&cd->irq_enabled, 1, 0)) { + disable_irq_nosync(cd->irq); + ts_debug("Irq disabled"); + } + return 0; +} + static int brl_read(struct goodix_ts_core *cd, unsigned int addr, unsigned char *data, unsigned int len) { @@ -1830,6 +1839,7 @@ static struct goodix_ts_hw_ops brl_hw_ops = { .gesture = brl_gesture, .reset = brl_reset, .irq_enable = brl_irq_enable, + .disable_irq_nosync = brl_disable_irq_nosync, .read = brl_read, .read_fast = brl_read_fast, .write = brl_write, |