Skip to content

Commit f6beb67

Browse files
jdelvareJean Delvare
authored and
Jean Delvare
committed
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
1 parent 1bddab7 commit f6beb67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/i2c/algos/i2c-algo-bit.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
250250
sda = getsda(adap);
251251
scl = (adap->getscl == NULL) ? 1 : getscl(adap);
252252
if (!scl || !sda) {
253-
printk(KERN_WARNING "%s: bus seems to be busy\n", name);
253+
printk(KERN_WARNING
254+
"%s: bus seems to be busy (scl=%d, sda=%d)\n",
255+
name, scl, sda);
254256
goto bailout;
255257
}
256258

0 commit comments

Comments
 (0)