diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-08-28 14:37:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-28 15:31:13 -0700 |
commit | c5df9b7a7c7600e4365e81f64ea44beb5be8bfa7 (patch) | |
tree | 8a896e389021b6a8d5870336d3781e025a4d37b2 /drivers/hwmon/it87.c | |
parent | 87673dd735b8e089b7f2830edd353aa5f5e743ad (diff) |
it87: Overwrite broken default limits
it87: Overwrite broken default limits
Some IT8716F chips where seen with unreasonable defaults for low
voltage and high temperature limits. Overwrite them with sane defaults
so as to not generate meaningless alarms.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon/it87.c')
-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) data->manual_pwm_ctl[i] = 0xff; } + /* Some chips seem to have default value 0xff for all limit + * registers. For low voltage limits it makes no sense and triggers + * alarms, so change to 0 instead. For high temperature limits, it + * means -1 degree C, which surprisingly doesn't trigger an alarm, + * but is still confusing, so change to 127 degrees C. */ + for (i = 0; i < 8; i++) { + tmp = it87_read_value(client, IT87_REG_VIN_MIN(i)); + if (tmp == 0xff) + it87_write_value(client, IT87_REG_VIN_MIN(i), 0); + } + for (i = 0; i < 3; i++) { + tmp = it87_read_value(client, IT87_REG_TEMP_HIGH(i)); + if (tmp == 0xff) + it87_write_value(client, IT87_REG_TEMP_HIGH(i), 127); + } + /* Check if temperature channnels are reset manually or by some reason */ tmp = it87_read_value(client, IT87_REG_TEMP_ENABLE); if ((tmp & 0x3f) == 0) { |