]> git.baikalelectronics.ru Git - kernel.git/commit
Input: iqs7222 - handle reset during ATI
authorJeff LaBundy <jeff@labundy.com>
Mon, 27 Jun 2022 22:15:09 +0000 (15:15 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 27 Jun 2022 22:25:57 +0000 (15:25 -0700)
commitda86ea81593e6e616f8e805b0c2b07e3b939ef4d
treec79ac7bce8fc50d1b5d2e80e9976ef8902cff4a4
parent4c832e942086d0820198ebe358e38a1fe4d0dfe6
Input: iqs7222 - handle reset during ATI

If the device suffers a spurious reset during ATI, there is no point
in enduring any further retries. Instead, simply return successfully
from the polling loop.

In this case, the interrupt handler will intervene and recognize the
device has been reset. It then proceeds to initialize the device and
trigger ATI once more.

As part of this change, swap the order of status field evaluation to
match that of the interrupt handler, and correct a nearby off-by-one
error that causes an error message to suggest the final attempt will
be retried.

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-6-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs7222.c