mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-26 12:24:33 +00:00
(mds) fix writes to fan_div first value.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@947 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
6b593aa26a
commit
ee0fd78049
1 file changed
+8
-8
@@ -955,17 +955,17 @@ void mtp008_fan_div(struct i2c_client *client, int operation,
|
||||
data->fan_div[2] = DIV_TO_REG(results[2]);
|
||||
val = mtp008_read_value(client, MTP008_REG_PIN_CTRL1);
|
||||
val = (val & 0x3f) | (data->fan_div[2] & 0x03) << 6;
|
||||
|
||||
mtp008_write_value(client, MTP008_REG_PIN_CTRL1, val);
|
||||
}
|
||||
if (*nrels_mag >= 2) {
|
||||
data->fan_div[1] = DIV_TO_REG(results[1]);
|
||||
if (*nrels_mag >= 1) {
|
||||
val = mtp008_read_value(client, MTP008_REG_VID_FANDIV);
|
||||
val = (val & 0x3f) | (data->fan_div[1] & 0x03) << 6;
|
||||
}
|
||||
if (*nrels_mag >= 2) {
|
||||
val = (val & 0xcf) | (data->fan_div[1] & 0x03) << 4;
|
||||
|
||||
if (*nrels_mag >= 2) {
|
||||
data->fan_div[1] = DIV_TO_REG(results[1]);
|
||||
val = (val & 0x3f) |
|
||||
(data->fan_div[1] & 0x03) << 6;
|
||||
}
|
||||
data->fan_div[0] = DIV_TO_REG(results[0]);
|
||||
val = (val & 0xcf) | (data->fan_div[0] & 0x03) << 4;
|
||||
mtp008_write_value(client, MTP008_REG_VID_FANDIV, val);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user