linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c-s3c2410: Decrease delay after end of transaction
@ 2010-04-20 10:53 Yauhen Kharuzhy
  2010-04-20 11:13 ` Ben Dooks
  0 siblings, 1 reply; 2+ messages in thread
From: Yauhen Kharuzhy @ 2010-04-20 10:53 UTC (permalink / raw)
  To: Ben Dooks
  Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Yauhen Kharuzhy

msleep(1) which has been used for delay after issuing a STOP condition
to bus cause very big delay (min 1/HZ s). This is makes bulk register
update in I2C devices (for instance video camera) very slowly.

Seems that this delay can be safely decreased to few tens of
microseconds.

Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy-NihHnkIkDZhBDgjK7y7TUQ@public.gmane.org>
---
 drivers/i2c/busses/i2c-s3c2410.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index d27072b..de20a4e 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -521,7 +521,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
 
 	/* ensure the stop has been through the bus */
 
-	msleep(1);
+	udelay(50);
 
  out:
 	return ret;
-- 
1.6.6.1

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

* Re: [PATCH] i2c-s3c2410: Decrease delay after end of transaction
  2010-04-20 10:53 [PATCH] i2c-s3c2410: Decrease delay after end of transaction Yauhen Kharuzhy
@ 2010-04-20 11:13 ` Ben Dooks
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2010-04-20 11:13 UTC (permalink / raw)
  To: Yauhen Kharuzhy
  Cc: Ben Dooks, Jean Delvare, linux-i2c, linux-kernel,
	linux-samsung-soc

On Tue, Apr 20, 2010 at 01:53:19PM +0300, Yauhen Kharuzhy wrote:
> msleep(1) which has been used for delay after issuing a STOP condition
> to bus cause very big delay (min 1/HZ s). This is makes bulk register
> update in I2C devices (for instance video camera) very slowly.
> 
> Seems that this delay can be safely decreased to few tens of
> microseconds.

Mark Brown has already submitted a similar patch that uses the bus
busy bit. will be in the i2c-next tree soon.
 
> Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
> ---
>  drivers/i2c/busses/i2c-s3c2410.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index d27072b..de20a4e 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -521,7 +521,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
>  
>  	/* ensure the stop has been through the bus */
>  
> -	msleep(1);
> +	udelay(50);
>  
>   out:
>  	return ret;
> -- 
> 1.6.6.1
> 

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

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

end of thread, other threads:[~2010-04-20 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 10:53 [PATCH] i2c-s3c2410: Decrease delay after end of transaction Yauhen Kharuzhy
2010-04-20 11:13 ` Ben Dooks

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