Skip to content

Commit

Permalink
hwmon: (w83627hf) Don't touch nonexistent I2C address registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Dec 19, 2012
1 parent 7e630bb commit 8f3c7c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/hwmon/w83627hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,8 +1732,10 @@ static void w83627hf_init_device(struct platform_device *pdev)
/* Minimize conflicts with other winbond i2c-only clients... */
/* disable i2c subclients... how to disable main i2c client?? */
/* force i2c address to relatively uncommon address */
w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
if (type == w83627hf) {
w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
}

/* Read VID only once */
if (type == w83627hf || type == w83637hf) {
Expand Down

0 comments on commit 8f3c7c5

Please sign in to comment.