Re: [PATCH 2/2] i2c-algo-bit: Be verbose on bus testing failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 4, 2011 at 8:45 AM, Jean Delvare <jdelvare@xxxxxxx> 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@xxxxxxx>
> Cc: Alex Deucher <alexdeucher@xxxxxxxxx>

Reviewed-by: Alex Deucher <alexdeucher@xxxxxxxxx>

> ---
>  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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux