Input: iqs269a - do not poll during suspend or resume
authorJeff LaBundy <jeff@labundy.com>
Tue, 3 Jan 2023 17:59:21 +0000 (11:59 -0600)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 11 Jan 2023 01:00:25 +0000 (17:00 -0800)
commit18ab69c8ca5678324efbeed874b707ce7b2feae1
tree33d6b29c121248ffc2fcf8c1e8063d15f61c18d8
parent3689abfc4e369a643d758a02fb9ad0b2403d6d6d
Input: iqs269a - do not poll during suspend or resume

Polling the device while it transitions from automatic to manual
power mode switching may keep the device from actually finishing
the transition. The process appears to time out depending on the
polling rate and the device's core clock frequency.

This is ultimately unnecessary in the first place; instead it is
sufficient to write the desired mode during initialization, then
disable automatic switching at suspend. This eliminates the need
to ensure the device is prepared for a manual change and removes
the 'suspend_mode' variable.

Similarly, polling the device while it transitions from one mode
to another under manual control may time out as well. This added
step does not appear to be necessary either, so drop it.

Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/Y7Rs+eEXlRw4Vq57@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs269a.c