34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 7ea8381918619b771772e50827c675912441878f Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Sat, 29 Oct 2022 23:18:38 +0200
|
|
Subject: [PATCH 382/464] input: pinephone-keyboard: Don't print error when the
|
|
keyboard is not connected
|
|
|
|
This is needlessly nosiy for people who don't have KB connected, or
|
|
don't own one.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/input/keyboard/pinephone-keyboard.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
|
|
index 25f569f52523..1e745fd761c7 100644
|
|
--- a/drivers/input/keyboard/pinephone-keyboard.c
|
|
+++ b/drivers/input/keyboard/pinephone-keyboard.c
|
|
@@ -371,6 +371,11 @@ static int ppkb_probe(struct i2c_client *client)
|
|
ret = i2c_smbus_read_i2c_block_data(client, 0, sizeof(info), info);
|
|
if (ret != sizeof(info)) {
|
|
error = ret < 0 ? ret : -EIO;
|
|
+ if (error == -ENXIO) {
|
|
+ dev_info(dev, "Keyboard was not found on the I2C bus, maybe it's disconnected.\n");
|
|
+ return error;
|
|
+ }
|
|
+
|
|
dev_err(dev, "Failed to read device ID: %d\n", error);
|
|
return error;
|
|
}
|
|
--
|
|
2.34.1
|
|
|