Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36725
b: refs/heads/master
c: c5df9b7
h: refs/heads/master
i:
  36723: 07f84f1
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Sep 28, 2006
1 parent 8c084f2 commit f7d9157
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87673dd735b8e089b7f2830edd353aa5f5e743ad
refs/heads/master: c5df9b7a7c7600e4365e81f64ea44beb5be8bfa7
16 changes: 16 additions & 0 deletions trunk/drivers/hwmon/it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f7d9157

Please sign in to comment.