Commit 4e809b45 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: More verbose w83l785ts driver

This simple patch increases the verbosity of the w83l785ts hardware
monitoring driver. I wrote it months ago in the hope it would help solve
a reported problem [1]. Not sure whether it did (no news from user since
July), but the extra debug info may help in the future and doesn't hurt
otherwise, so let's have this in for every user (not that many AFAIK),
just in case.


[1] http://bugzilla.kernel.org/show_bug.cgi?id=2899Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 0a57a616
......@@ -280,14 +280,17 @@ static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
* default value requested by the caller. */
for (i = 1; i <= MAX_RETRIES; i++) {
value = i2c_smbus_read_byte_data(client, reg);
if (value >= 0)
if (value >= 0) {
dev_dbg(&client->dev, "Read 0x%02x from register "
"0x%02x.\n", value, reg);
return value;
}
dev_dbg(&client->dev, "Read failed, will retry in %d.\n", i);
msleep(i);
}
dev_err(&client->dev, "Couldn't read value from register. "
"Please report.\n");
dev_err(&client->dev, "Couldn't read value from register 0x%02x. "
"Please report.\n", reg);
return defval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment