Input: iqs7222 - acknowledge reset before writing registers
authorJeff LaBundy <jeff@labundy.com>
Mon, 27 Jun 2022 22:14:42 +0000 (15:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 27 Jun 2022 22:25:55 +0000 (15:25 -0700)
commit2e70ef525b7309287b2d4dd24e7c9c038a006328
treefa56c6450082a49b950403ce8652967c7a9b8b27
parent1e4189d8af2749e2db406f92bdc4abccbab63138
Input: iqs7222 - acknowledge reset before writing registers

If the device suffers a spurious reset while reacting to a previous
spurious reset, the second reset interrupt is preempted because the
ACK_RESET bit is written last.

To solve this problem, write the ACK_RESET bit prior to writing any
other registers. This ensures that any registers written before the
second spurious reset will be rewritten.

Last but not least, the order in which the ACK_RESET bit is written
relative to the second filter beta register is important for select
variants of silicon. Enforce the correct order so as to not clobber
the system status register.

Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20220626072412.475211-5-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs7222.c