Input: iqs269a - configure device with a single block write
authorJeff LaBundy <jeff@labundy.com>
Tue, 3 Jan 2023 17:59:12 +0000 (11:59 -0600)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 11 Jan 2023 00:56:27 +0000 (16:56 -0800)
commit3689abfc4e369a643d758a02fb9ad0b2403d6d6d
tree794d1f532f12cb0a86767e93c38a3d9103f841b0
parente023cc4abde3c01b895660b0e5a8488deb36b8c1
Input: iqs269a - configure device with a single block write

Unless it is being done as part of servicing a soft reset interrupt,
configuring channels on-the-fly (as is the case when writing to the
ati_trigger attribute) may cause GPIO3 (which reflects the state of
touch for a selected channel) to be inadvertently asserted.

To solve this problem, follow the vendor's recommendation and write
all channel configuration as well as the REDO_ATI register field as
part of a single block write. This ensures the device has been told
to re-calibrate itself following an I2C stop condition, after which
sensing resumes and GPIO3 may be asserted.

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/Y7Rs8GyV7g0nF5Yy@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs269a.c