Skip to content

Commit

Permalink
hwmon: (max6697) fix MAX6581 ideality
Browse files Browse the repository at this point in the history
Without this patch, the values for ideality (register 0x4b) and ideality
selection mask (register 0x4c) are inverted.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Vivien Didelot authored and Guenter Roeck committed Aug 3, 2013
1 parent 5ae90d8 commit 5c52add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/max6697.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,12 @@ static int max6697_init_chip(struct i2c_client *client)
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(client, MAX6581_REG_IDEALITY,
pdata->ideality_mask >> 1);
pdata->ideality_value);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(client,
MAX6581_REG_IDEALITY_SELECT,
pdata->ideality_value);
pdata->ideality_mask >> 1);
if (ret < 0)
return ret;
}
Expand Down

0 comments on commit 5c52add

Please sign in to comment.