[PATCH v2 2/2] input: touch: eeti: read hardware state once after wakeup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For systems in which the touch IRQ is acting as wakeup source, the interrupt
controller might not latch the GPIO IRQ during sleep. In such cases, the
interrupt will never occur again after resume, hence the touch screen
appears dead.

To fix this, call into eeti_ts_read() once to read the hardware status and
to arm the IRQ again. Do that before enabling the IRQ so we don't race
against the ISR.

Signed-off-by: Daniel Mack <daniel@xxxxxxxxxx>
Reported-by: Sven Neumann <Sven.Neumann@xxxxxxxxx>
---
v2: swap the order of eeti_ts_read() and enable_irq() to address a
potential race.

 drivers/input/touchscreen/eeti_ts.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index f5724aaa815b..e2d10febbcf1 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -116,6 +116,7 @@ static void eeti_ts_start(struct eeti_ts *eeti)
 {
 	eeti->running = true;
 	wmb();
+	eeti_ts_read(eeti);
 	enable_irq(eeti->client->irq);
 }
 
-- 
2.20.1




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux