From 5672bd308ef23b81eb40dd2963f925fd671a66c2 Mon Sep 17 00:00:00 2001
From: Philipp Puschmann
Date: Fri, 5 May 2023 11:48:45 -0700
Subject: Input: edt-ft5x06 - add delay after waking up
The touch controller needs some time to wake-up after setting the wake-up
gpio. Without having a delay after wake-up probing regularly fails in
edt_ft5x06_ts_identify() with an error (i.e. EREMOTEIO) that was caused
by a failed i2c transfer.
The datasheet sets the wake-up time to 5 ms, although it is not entirely
clear.
Signed-off-by: Philipp Puschmann
Link: https://lore.kernel.org/r/20230505115823.545803-1-p.puschmann@pironex.com
Signed-off-by: Dmitry Torokhov
---
drivers/input/touchscreen/edt-ft5x06.c | 1 +
1 file changed, 1 insertion(+)
(limited to 'drivers/input')
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 24ab9e9f5b21..3a1a5e76cd68 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1241,6 +1241,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client)
if (tsdata->wake_gpio) {
usleep_range(5000, 6000);
gpiod_set_value_cansleep(tsdata->wake_gpio, 1);
+ usleep_range(5000, 6000);
}
if (tsdata->reset_gpio) {
--
cgit v1.2.3-70-g09d2