Input: ads7846 - fix race that causes missing releases
authorDavid Jander <david@protonic.nl>
Wed, 11 Nov 2020 19:00:59 +0000 (11:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:14 +0000 (11:53 +0100)
commit77b0790ac6bdbd01b022273b070ca20919c571ac
treecd1343af7ebab54ecb086bead0d24ca6e3de9f28
parent1a94c18952af51783056e5de12c007717b738472
Input: ads7846 - fix race that causes missing releases

[ Upstream commit e52cd628a03f72a547dbf90ccb703ee64800504a ]

If touchscreen is released while busy reading HWMON device, the release
can be missed. The IRQ thread is not started because no touch is active
and BTN_TOUCH release event is never sent.

Fixes: f5a28a7d4858f94a ("Input: ads7846 - avoid pen up/down when reading hwmon")
Co-developed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20201027105416.18773-1-o.rempel@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/ads7846.c