Patch "Input: iqs7222 - handle reset during ATI" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Input: iqs7222 - handle reset during ATI

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-iqs7222-handle-reset-during-ati.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 8635c68891c6d786d644747d599c41bdf512fbbf Mon Sep 17 00:00:00 2001
From: Jeff LaBundy <jeff@xxxxxxxxxxx>
Date: Mon, 27 Jun 2022 15:15:09 -0700
Subject: Input: iqs7222 - handle reset during ATI

From: Jeff LaBundy <jeff@xxxxxxxxxxx>

commit 8635c68891c6d786d644747d599c41bdf512fbbf upstream.

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: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: Jeff LaBundy <jeff@xxxxxxxxxxx>
Link: https://lore.kernel.org/r/20220626072412.475211-6-jeff@xxxxxxxxxxx
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/input/misc/iqs7222.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c
index aa46f2cd4d34..e65260d290cc 100644
--- a/drivers/input/misc/iqs7222.c
+++ b/drivers/input/misc/iqs7222.c
@@ -1314,12 +1314,15 @@ static int iqs7222_ati_trigger(struct iqs7222_private *iqs7222)
 			if (error)
 				return error;
 
-			if (sys_status & IQS7222_SYS_STATUS_ATI_ACTIVE)
-				continue;
+			if (sys_status & IQS7222_SYS_STATUS_RESET)
+				return 0;
 
 			if (sys_status & IQS7222_SYS_STATUS_ATI_ERROR)
 				break;
 
+			if (sys_status & IQS7222_SYS_STATUS_ATI_ACTIVE)
+				continue;
+
 			/*
 			 * Use stream-in-touch mode if either slider reports
 			 * absolute position.
@@ -1336,7 +1339,7 @@ static int iqs7222_ati_trigger(struct iqs7222_private *iqs7222)
 		dev_err(&client->dev,
 			"ATI attempt %d of %d failed with status 0x%02X, %s\n",
 			i + 1, IQS7222_NUM_RETRIES, (u8)sys_status,
-			i < IQS7222_NUM_RETRIES ? "retrying..." : "stopping");
+			i + 1 < IQS7222_NUM_RETRIES ? "retrying" : "stopping");
 	}
 
 	return -ETIMEDOUT;
-- 
2.37.2



Patches currently in stable-queue which might be from jeff@xxxxxxxxxxx are

queue-5.19/dt-bindings-input-iqs7222-remove-support-for-rf-filter.patch
queue-5.19/input-iqs7222-handle-reset-during-ati.patch
queue-5.19/input-iqs7222-fortify-slider-event-reporting.patch
queue-5.19/dt-bindings-input-iqs7222-correct-bottom-speed-step-size.patch
queue-5.19/input-iqs7222-acknowledge-reset-before-writing-registers.patch
queue-5.19/input-iqs7222-remove-support-for-rf-filter.patch
queue-5.19/input-iqs7222-correct-slider-event-disable-logic.patch
queue-5.19/input-iqs7222-protect-volatile-registers.patch
queue-5.19/dt-bindings-input-iqs7222-extend-slider-mapped-gpio-to-iqs7222c.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux