]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4c832e942086d0820198ebe358e38a1fe4d0dfe6
treefa56c6450082a49b950403ce8652967c7a9b8b27
parentc6f8378c33bb7a8ffaf7108eb7b3bc6844fc0b7d
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: 27eaac94c6be ("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