Input: edt-ft5x06 - improve power management operations
authorMarco Felsch <m.felsch@pengutronix.de>
Sat, 9 May 2020 19:10:40 +0000 (12:10 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 9 May 2020 21:39:37 +0000 (14:39 -0700)
commit21d1611a83f8aa3907ca653b5851dd01951d4da6
tree90068f3ee4092cd12caa71785108896d0161fef3
parentf4ee52f3ad8c9210030a9fe48bbb74dbc7c9f90e
Input: edt-ft5x06 - improve power management operations

It is possible to bring the device into a deep sleep state. To exit this
state the reset or wakeup pin must be toggeled as documented in [1].
Because of the poor documentation I used the several downstream kernels
[2] and other applications notes [3] to indentify the related registers.

Furthermore I added the support to disable the device completely which
is obviously the most effective power-saving mechanism. This mechanism
needs the reset pin to ensure the power-up/down sequence.

We can't apply any of these power-saving mechanism if both pins are
missing (not connected) or if it is a wakeup device.

[1] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x26.pdf
    https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x06.pdf
[2] https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.4/drivers/input/touchscreen/ft5x_ts.c
    https://github.com/Pablito2020/focaltech-touch-driver/blob/master/ft5336_driver.c
[3] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x16_registers.pdf

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20200227112819.16754-4-m.felsch@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/edt-ft5x06.c