Skip to contentSkip to conversation

Input: ili210x - Fix reset timing

PATCH Applied Marek Vasut 2 participants 2 messages May 18, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: ili210x - Fix reset timing

According to Ilitek "231x & ILI251x Programming Guide" Version: 2.30 "2.1. Power Sequence", "T4 Chip Reset and discharge time" is minimum 10ms and "T2 Chip initial time" is maximum 150ms. Adjust the reset timings such that T4 is 12ms and T2 is 160ms to fit those figures.

This prevents sporadic touch controller start up failures when some systems with at least ILI251x controller boot, without this patch the systems sometimes fail to communicate with the touch controller.

Fixes 201f3c803544c ("Input: ili210x - add reset GPIO support")
Cc Dmitry Torokhov <[email protected]>

---
V2: Use usleep_range() for shorter 12..15ms delay

---
 drivers/input/touchscreen/ili210x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/ili210x.c +2 -2
index 2bd407d86bae5..3a48262fb3d35 100644
@@ -951,9 +951,9 @@ static int ili210x_i2c_probe(struct i2c_client *client,
 		if (error)
 			return error;
 
-		usleep_range(50, 100);
+		usleep_range(12000, 15000);
 		gpiod_set_value_cansleep(reset_gpio, 0);
-		msleep(100);
+		msleep(160);
 	}
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
Signature · 1 line
2.35.1
maintainer Applied
#1 lore raw
Quoted 5 lines · Marek Vasut

According to Ilitek "231x & ILI251x Programming Guide" Version: 2.30 "2.1. Power Sequence", "T4 Chip Reset and discharge time" is minimum 10ms and "T2 Chip initial time" is maximum 150ms. Adjust the reset timings such that T4 is 12ms and T2 is 160ms to fit those figures.

Quoted 7 lines

This prevents sporadic touch controller start up failures when some systems with at least ILI251x controller boot, without this patch the systems sometimes fail to communicate with the touch controller.

Fixes 201f3c803544c ("Input: ili210x - add reset GPIO support")
Cc Dmitry Torokhov <[email protected]>

Applied, thank you.

Signature · 1 line
Dmitry