]> git.baikalelectronics.ru Git - kernel.git/commit
Input: eeti_ts - read hardware state once after wakeup
authorDaniel Mack <daniel@zonque.org>
Tue, 7 May 2019 03:03:46 +0000 (20:03 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 15 May 2019 23:29:14 +0000 (16:29 -0700)
commit5a10ae2a90fbfc61844fb31f333c3a18e4b97fd1
treef7d02c0a5a2e4a9aafae611f9c382de25ba3ef8c
parent75dc5fdf6e9777ad4567bf778fe02cbf31257225
Input: eeti_ts -  read hardware state once after wakeup

For systems in which the touch IRQ is acting as wakeup source, and that do
not support level-driven interrupts, 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, check for the assertion of the attn gpio, and read form the
controller once in the resume path to read the hardware status and
to arm the IRQ again.

Introduce a mutex to guard eeti_ts_read() against parallel invocations
from different contexts.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reported-by: Sven Neumann <Sven.Neumann@teufel.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/eeti_ts.c