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