Skip to contentSkip to conversation

I2C: More verbose w83l785ts driver

PATCH New Jean Delvare 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 I2C: More verbose w83l785ts driver

Hi Greg,

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.

This is obviously non-critical and can be delayed until after 2.6.10 is released ;)

Please apply,
thanks.

[1] http://bugzilla.kernel.org/show_bug.cgi?id(99

drivers/i2c/chips/w83l785ts.c renamed from drivers/i2c/chips/w83l785ts.c.orig +6 -3
@@ -280,14 +280,17 @@
 	 * 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;
 }
 
Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/
Applied
#1 lore raw

PATCH 1/1 I2C: More verbose w83l785ts driver

Quoted 11 lines · Jean Delvare

Hi Greg,

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.

This is obviously non-critical and can be delayed until after 2.6.10 is released ;)

Applied, thanks.

greg k-h