diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/it87.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 956cd553c711..de62f60bcaf1 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -1202,6 +1202,22 @@ static void it87_init_client(struct i2c_client *client, struct it87_data *data) | |||
1202 | data->manual_pwm_ctl[i] = 0xff; | 1202 | data->manual_pwm_ctl[i] = 0xff; |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | /* Some chips seem to have default value 0xff for all limit | ||
1206 | * registers. For low voltage limits it makes no sense and triggers | ||
1207 | * alarms, so change to 0 instead. For high temperature limits, it | ||
1208 | * means -1 degree C, which surprisingly doesn't trigger an alarm, | ||
1209 | * but is still confusing, so change to 127 degrees C. */ | ||
1210 | for (i = 0; i < 8; i++) { | ||
1211 | tmp = it87_read_value(client, IT87_REG_VIN_MIN(i)); | ||
1212 | if (tmp == 0xff) | ||
1213 | it87_write_value(client, IT87_REG_VIN_MIN(i), 0); | ||
1214 | } | ||
1215 | for (i = 0; i < 3; i++) { | ||
1216 | tmp = it87_read_value(client, IT87_REG_TEMP_HIGH(i)); | ||
1217 | if (tmp == 0xff) | ||
1218 | it87_write_value(client, IT87_REG_TEMP_HIGH(i), 127); | ||
1219 | } | ||
1220 | |||
1205 | /* Check if temperature channnels are reset manually or by some reason */ | 1221 | /* Check if temperature channnels are reset manually or by some reason */ |
1206 | tmp = it87_read_value(client, IT87_REG_TEMP_ENABLE); | 1222 | tmp = it87_read_value(client, IT87_REG_TEMP_ENABLE); |
1207 | if ((tmp & 0x3f) == 0) { | 1223 | if ((tmp & 0x3f) == 0) { |