linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: sa1111ps2 - extend test delay
@ 2017-09-26 16:25 Russell King
  2017-09-26 16:57 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2017-09-26 16:25 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input

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 <rmk+kernel@armlinux.org.uk>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: sa1111ps2 - extend test delay
  2017-09-26 16:25 [PATCH] Input: sa1111ps2 - extend test delay Russell King
@ 2017-09-26 16:57 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2017-09-26 16:57 UTC (permalink / raw)
  To: Russell King; +Cc: linux-input

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 <rmk+kernel@armlinux.org.uk>

Applied, thank you.

> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-26 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 16:25 [PATCH] Input: sa1111ps2 - extend test delay Russell King
2017-09-26 16:57 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).