Browse Source

i2c-algo-bit: Be verbose on bus testing failure

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@suse.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Jean Delvare 13 years ago
parent
commit
f6beb67d8e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/i2c/algos/i2c-algo-bit.c

+ 3 - 1
drivers/i2c/algos/i2c-algo-bit.c

@@ -250,7 +250,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
 	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;
 	}