summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max6697.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2013-07-30 23:14:34 +0200
committerGuenter Roeck <linux@roeck-us.net>2013-08-03 16:04:50 +0200
commit5c52add19733eb36d8619713312f5604efef3502 (patch)
tree978f6bdfe620e5795effa1d8e393eaf2012d3c94 /drivers/hwmon/max6697.c
parentLinux 3.11-rc3 (diff)
downloadlinux-5c52add19733eb36d8619713312f5604efef3502.tar.xz
linux-5c52add19733eb36d8619713312f5604efef3502.zip
hwmon: (max6697) fix MAX6581 ideality
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>
Diffstat (limited to 'drivers/hwmon/max6697.c')
-rw-r--r--drivers/hwmon/max6697.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/max6697.c b/drivers/hwmon/max6697.c
index 328fb0353c17..a41b5f3fc506 100644
--- a/drivers/hwmon/max6697.c
+++ b/drivers/hwmon/max6697.c
@@ -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;
}