Patch "Input: qt1050 - handle CHIP_ID reading error" has been added to the 6.6-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: qt1050 - handle CHIP_ID reading error

to the 6.6-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-qt1050-handle-chip_id-reading-error.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 98eba3ecd60f9c11791922531b0aabd7706dbe22
Author: Andrei Lalaev <andrei.lalaev@xxxxxxxxxxxxxx>
Date:   Mon Jun 17 20:30:18 2024 +0200

    Input: qt1050 - handle CHIP_ID reading error
    
    [ Upstream commit 866a5c7e2781cf1b019072288f1f5c64186dcb63 ]
    
    If the device is missing, we get the following error:
    
      qt1050 3-0041: ID -1340767592 not supported
    
    Let's handle this situation and print more informative error
    when reading of CHIP_ID fails:
    
      qt1050 3-0041: Failed to read chip ID: -6
    
    Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support")
    Signed-off-by: Andrei Lalaev <andrei.lalaev@xxxxxxxxxxxxxx>
    Reviewed-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240617183018.916234-1-andrey.lalaev@xxxxxxxxx
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
index 6953097db4456..cd2f4216daf86 100644
--- a/drivers/input/keyboard/qt1050.c
+++ b/drivers/input/keyboard/qt1050.c
@@ -226,7 +226,12 @@ static bool qt1050_identify(struct qt1050_priv *ts)
 	int err;
 
 	/* Read Chip ID */
-	regmap_read(ts->regmap, QT1050_CHIP_ID, &val);
+	err = regmap_read(ts->regmap, QT1050_CHIP_ID, &val);
+	if (err) {
+		dev_err(&ts->client->dev, "Failed to read chip ID: %d\n", err);
+		return false;
+	}
+
 	if (val != QT1050_CHIP_ID_VER) {
 		dev_err(&ts->client->dev, "ID %d not supported\n", val);
 		return false;




[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