aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2012-12-19 16:17:00 -0500
committerJean Delvare <khali@endymion.delvare>2012-12-19 16:17:00 -0500
commit8f3c7c547d47bcfcf9ca2ed30b79733ce1e7ad3a (patch)
tree9cbb66aade67d1550a25101e8b75d9c65d7b6159
parent7e630bb55a52cfaa35011c0ebc2efc96f13e5135 (diff)
hwmon: (w83627hf) Don't touch nonexistent I2C address registers
Only the W83627HF could be accessed through I2C. All other supported chips are LPC-only, so they do not have I2C address registers. Don't write to nonexistent or reserved registers on these chips. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/w83627hf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 9170746e9743..81f486520cea 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1732,8 +1732,10 @@ static void w83627hf_init_device(struct platform_device *pdev)
1732 /* Minimize conflicts with other winbond i2c-only clients... */ 1732 /* Minimize conflicts with other winbond i2c-only clients... */
1733 /* disable i2c subclients... how to disable main i2c client?? */ 1733 /* disable i2c subclients... how to disable main i2c client?? */
1734 /* force i2c address to relatively uncommon address */ 1734 /* force i2c address to relatively uncommon address */
1735 w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89); 1735 if (type == w83627hf) {
1736 w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c); 1736 w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
1737 w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
1738 }
1737 1739
1738 /* Read VID only once */ 1740 /* Read VID only once */
1739 if (type == w83627hf || type == w83637hf) { 1741 if (type == w83627hf || type == w83637hf) {