[PATCH] Input: sa1111ps2 - extend test delay

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE3233d

2 messages, 2 authors, 2017-09-26 · open the first message on its own page

[PATCH] Input: sa1111ps2 - extend test delay

From: Russell King <hidden>
Date: 2017-09-26 16:26:02

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

Signed-off-by: Russell King <redacted>
---
 drivers/input/serio/sa1111ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index f1c036260d25..f9e5c793f4f0 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -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);
-- 
2.7.4

Re: [PATCH] Input: sa1111ps2 - extend test delay

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2017-09-26 16:57:30

On Tue, Sep 26, 2017 at 05:25:53PM +0100, Russell King wrote:
A 2us delay is too small for the bus to settle after writing to the
register.  Extend to 10us which gives more reliable results.

Signed-off-by: Russell King <redacted>
Applied, thank you.
quoted hunk
---
 drivers/input/serio/sa1111ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index f1c036260d25..f9e5c793f4f0 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -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);
-- 
2.7.4
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help