diff options
author | Steve Pfetsch <spfetsch@google.com> | 2019-05-14 23:40:33 -0700 |
---|---|---|
committer | Steve Pfetsch <spfetsch@google.com> | 2019-05-21 17:06:49 -0700 |
commit | e4865c9c23300f703bb23218074b0ffdf9b8cda9 (patch) | |
tree | 840ad2ba80d3ec700c166799d68a7002fe9fdd9b | |
parent | b5d1e5a589eacc667cc345567e8c5c40fae6e96e (diff) | |
download | fts_touch_s5-e4865c9c23300f703bb23218074b0ffdf9b8cda9.tar.gz |
input: touchscreen: stm: flush the FIFO before suspend
fts_suspend_work runs while holding the bus_mutex, which prevents the
interrupt handler from running and using the bus as the touch driver
suspends. Once fts_suspend_work disables touch sensing, the touch IC
generates a status event and pulls down its INT line, but the driver
disables interrupt handling and does not have an opportunity to handle
the event before suspending. Since the event is expected and harmless,
flush the touch IC's FIFO after interrupts are disabled.
Bug: 128865249
Change-Id: Ib2a14cfc407793d0989bbef0068f389945493386
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
-rw-r--r-- | fts.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4680,6 +4680,9 @@ static void fts_suspend_work(struct work_struct *work) fts_enableInterrupt(false); + /* Flush any outstanding touch events */ + flushFIFO(); + fts_set_switch_gpio(info, FTS_SWITCH_GPIO_VALUE_SLPI_MASTER); #ifdef CONFIG_TOUCHSCREEN_TBN |