Input: cyttsp5 - implement proper sleep and wakeup procedures
authorMaximilian Weigand <mweigand@mweigand.net>
Fri, 5 May 2023 18:30:12 +0000 (11:30 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 5 May 2023 18:50:12 +0000 (11:50 -0700)
commit3c98b8dbdced5d93cc7dfed0a1991fb265488bd9
treedb278403fee0ca44c42ab403224a62ea8bae2143
parentc73b4db076faf827d0656665ef5e97b76926b60f
Input: cyttsp5 - implement proper sleep and wakeup procedures

The touchscreen can be put into a deep sleep state that prevents it from
emitting touch irqs. Put the touchscreen into deep sleep during suspend
if it is not marked as a wakeup source.

This also fixes a problem with the touchscreen getting unresponsive after
system resume when a falling edge trigger is used for the interrupt.
When left on during suspend, the touchscreen would pull the interrupt
line down in response to touch events, leaving the interrupt effectively
disabled after resume.

Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
Reviewed-by: Alistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/20230504120316.408687-2-mweigand2017@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/cyttsp5.c