Input: qt1050 - handle CHIP_ID reading error
authorAndrei Lalaev <andrei.lalaev@anton-paar.com>
Mon, 17 Jun 2024 18:30:18 +0000 (20:30 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 25 Jun 2024 16:13:08 +0000 (09:13 -0700)
commit866a5c7e2781cf1b019072288f1f5c64186dcb63
tree388b743aeb60317ab1b3914b28a2d69871d9218f
parent0ca1323c6aba8fd9309ca33a4bf57c1c9fc06171
Input: qt1050 - handle CHIP_ID reading error

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@anton-paar.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20240617183018.916234-1-andrey.lalaev@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/qt1050.c