]> 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)
commit8e7941a8ed49015e54425af711378a92811278a1
treefa56c6450082a49b950403ce8652967c7a9b8b27
parent948a8c70d8244808855e000b48b8b0cd3a89214d
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: a8b0abcc88cc ("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