linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] i2c-algo-bit: Be verbose on bus testing failure
@ 2011-10-04 12:45 Jean Delvare
       [not found] ` <201110041445.57054.jdelvare-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2011-10-04 12:45 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Alex Deucher

If bus testing fails due to the bus being seen as busy, it might be
helpful for developers to know which line is unexpectedly low.

Signed-off-by: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
Cc: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/i2c/algos/i2c-algo-bit.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-3.0.orig/drivers/i2c/algos/i2c-algo-bit.c	2011-10-03 18:50:34.000000000 +0200
+++ linux-3.0/drivers/i2c/algos/i2c-algo-bit.c	2011-10-03 18:55:14.000000000 +0200
@@ -250,7 +250,9 @@ static int test_bus(struct i2c_adapter *
 	sda = getsda(adap);
 	scl = (adap->getscl == NULL) ? 1 : getscl(adap);
 	if (!scl || !sda) {
-		printk(KERN_WARNING "%s: bus seems to be busy\n", name);
+		printk(KERN_WARNING
+		       "%s: bus seems to be busy (scl=%d, sda=%d)\n",
+		       name, scl, sda);
 		goto bailout;
 	}
 

-- 
Jean Delvare
Suse L3

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

* Re: [PATCH 2/2] i2c-algo-bit: Be verbose on bus testing failure
       [not found] ` <201110041445.57054.jdelvare-l3A5Bk7waGM@public.gmane.org>
@ 2011-10-04 13:22   ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2011-10-04 13:22 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Tue, Oct 4, 2011 at 8:45 AM, Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org> wrote:
> If bus testing fails due to the bus being seen as busy, it might be
> helpful for developers to know which line is unexpectedly low.
>
> Signed-off-by: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
> Cc: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

> ---
>  drivers/i2c/algos/i2c-algo-bit.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> --- linux-3.0.orig/drivers/i2c/algos/i2c-algo-bit.c     2011-10-03 18:50:34.000000000 +0200
> +++ linux-3.0/drivers/i2c/algos/i2c-algo-bit.c  2011-10-03 18:55:14.000000000 +0200
> @@ -250,7 +250,9 @@ static int test_bus(struct i2c_adapter *
>        sda = getsda(adap);
>        scl = (adap->getscl == NULL) ? 1 : getscl(adap);
>        if (!scl || !sda) {
> -               printk(KERN_WARNING "%s: bus seems to be busy\n", name);
> +               printk(KERN_WARNING
> +                      "%s: bus seems to be busy (scl=%d, sda=%d)\n",
> +                      name, scl, sda);
>                goto bailout;
>        }
>
>
> --
> Jean Delvare
> Suse L3
>

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

end of thread, other threads:[~2011-10-04 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 12:45 [PATCH 2/2] i2c-algo-bit: Be verbose on bus testing failure Jean Delvare
     [not found] ` <201110041445.57054.jdelvare-l3A5Bk7waGM@public.gmane.org>
2011-10-04 13:22   ` Alex Deucher

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