提交 5c52add1 编写于 作者: V Vivien Didelot 提交者: Guenter Roeck

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: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 5ae90d8e
...@@ -605,12 +605,12 @@ static int max6697_init_chip(struct i2c_client *client) ...@@ -605,12 +605,12 @@ static int max6697_init_chip(struct i2c_client *client)
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = i2c_smbus_write_byte_data(client, MAX6581_REG_IDEALITY, ret = i2c_smbus_write_byte_data(client, MAX6581_REG_IDEALITY,
pdata->ideality_mask >> 1); pdata->ideality_value);
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = i2c_smbus_write_byte_data(client, ret = i2c_smbus_write_byte_data(client,
MAX6581_REG_IDEALITY_SELECT, MAX6581_REG_IDEALITY_SELECT,
pdata->ideality_value); pdata->ideality_mask >> 1);
if (ret < 0) if (ret < 0)
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册