armbian_build/patch/kernel/archive/sunxi-6.6/patches.megous/input-pinephone-keyboard-Wait-a-bit-after-enabling-vbus.patch
The-going 25b0741531 sunxi-6.6: megous patches: revert commit changes e103e2e1da
Undo changes that are made massively and create a lot of noise.
e103e2e1da
2025-01-19 20:22:11 +01:00

32 lines
1.1 KiB
Diff

From 6089ad38cfbede7abb69dbf1ca9b7dd30711b09e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 26 Nov 2022 15:18:14 +0100
Subject: input: pinephone-keyboard: Wait a bit after enabling vbus
In case the MCU was browned out, we want to wait a bit after enabling
VBUS and before probing the MCU over I2C, for the MCU to initialize.
Otherwise it may be possible for the MCU to fail to respond during probe
and for the driver to fail initialization.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/input/keyboard/pinephone-keyboard.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
index ceeb26069c8f..e4e266f1b70f 100644
--- a/drivers/input/keyboard/pinephone-keyboard.c
+++ b/drivers/input/keyboard/pinephone-keyboard.c
@@ -350,6 +350,8 @@ static int ppkb_probe(struct i2c_client *client)
return error;
}
+ mdelay(100);
+
ret = i2c_smbus_read_i2c_block_data(client, 0, sizeof(info), info);
if (ret != sizeof(info)) {
error = ret < 0 ? ret : -EIO;
--
2.35.3