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

[PATCH] w83792d: Be quiet on misdetection

Make the w83792d driver keep quiet when misdetecting a chip. This can
happen, and the user doesn't need to know.

Also renumber the messages, and add one, for consistency.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8c750c0b
...@@ -1161,7 +1161,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -1161,7 +1161,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind)
bank. */ bank. */
if (kind < 0) { if (kind < 0) {
if (w83792d_read_value(client, W83792D_REG_CONFIG) & 0x80) { if (w83792d_read_value(client, W83792D_REG_CONFIG) & 0x80) {
dev_warn(dev, "Detection failed at step 3\n"); dev_dbg(dev, "Detection failed at step 1\n");
goto ERROR1; goto ERROR1;
} }
val1 = w83792d_read_value(client, W83792D_REG_BANK); val1 = w83792d_read_value(client, W83792D_REG_BANK);
...@@ -1170,6 +1170,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -1170,6 +1170,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind)
if (!(val1 & 0x07)) { /* is Bank0 */ if (!(val1 & 0x07)) { /* is Bank0 */
if (((!(val1 & 0x80)) && (val2 != 0xa3)) || if (((!(val1 & 0x80)) && (val2 != 0xa3)) ||
((val1 & 0x80) && (val2 != 0x5c))) { ((val1 & 0x80) && (val2 != 0x5c))) {
dev_dbg(dev, "Detection failed at step 2\n");
goto ERROR1; goto ERROR1;
} }
} }
...@@ -1177,7 +1178,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -1177,7 +1178,7 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind)
should match */ should match */
if (w83792d_read_value(client, if (w83792d_read_value(client,
W83792D_REG_I2C_ADDR) != address) { W83792D_REG_I2C_ADDR) != address) {
dev_warn(dev, "Detection failed at step 5\n"); dev_dbg(dev, "Detection failed at step 3\n");
goto ERROR1; goto ERROR1;
} }
} }
......
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