Skip to contentSkip to conversation

Input: sa1111ps2 - extend test delay

PATCH Applied Russell King 2 participants 2 messages Sep 26, 2017

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

PATCH 1/1 Input: sa1111ps2 - extend test delay

A 2us delay is too small for the bus to settle after writing to the register. Extend to 10us which gives more reliable results.

---
 drivers/input/serio/sa1111ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/sa1111ps2.c +1 -1
index f1c036260d25..f9e5c793f4f0 100644
@@ -212,7 +212,7 @@ static unsigned int ps2_test_one(struct ps2if *ps2if,
 
 	writel_relaxed(PS2CR_ENA | mask, ps2if->base + PS2CR);
 
-	udelay(2);
+	udelay(10);
 
 	val = readl_relaxed(ps2if->base + PS2STAT);
 	return val & (PS2STAT_KBC | PS2STAT_KBD);
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 4 lines · Russell King

A 2us delay is too small for the bus to settle after writing to the register. Extend to 10us which gives more reliable results.

Applied, thank you.

Quoted 20 lines
---
 drivers/input/serio/sa1111ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/sa1111ps2.c +1 -1
index f1c036260d25..f9e5c793f4f0 100644
@@ -212,7 +212,7 @@ static unsigned int ps2_test_one(struct ps2if *ps2if,
 
 	writel_relaxed(PS2CR_ENA | mask, ps2if->base + PS2CR);
 
-	udelay(2);
+	udelay(10);
 
 	val = readl_relaxed(ps2if->base + PS2STAT);
 	return val & (PS2STAT_KBC | PS2STAT_KBD);
Signature · 1 line
2.7.4
Signature · 1 line
Dmitry