Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189901
b: refs/heads/master
c: a00afb9
h: refs/heads/master
i:
  189899: 5dfd0a4
v: v3
  • Loading branch information
Jean Delvare committed Apr 14, 2010
1 parent 238ac09 commit 1edeb0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7a78d2c2e2537fd24903e966f34aae50319d587
refs/heads/master: a00afb97e23fd904b12a3f4de3237d8ab2f68738
13 changes: 5 additions & 8 deletions trunk/drivers/hwmon/it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,

mutex_lock(&data->update_lock);

data->sensor = it87_read_value(data, IT87_REG_TEMP_ENABLE);
data->sensor &= ~(1 << nr);
data->sensor &= ~(8 << nr);
if (val == 2) { /* backwards compatibility */
Expand Down Expand Up @@ -1841,14 +1842,10 @@ static void __devinit it87_init_device(struct platform_device *pdev)
it87_write_value(data, IT87_REG_TEMP_HIGH(i), 127);
}

/* Check if temperature channels are reset manually or by some reason */
tmp = it87_read_value(data, IT87_REG_TEMP_ENABLE);
if ((tmp & 0x3f) == 0) {
/* Temp1,Temp3=thermistor; Temp2=thermal diode */
tmp = (tmp & 0xc0) | 0x2a;
it87_write_value(data, IT87_REG_TEMP_ENABLE, tmp);
}
data->sensor = tmp;
/* Temperature channels are not forcibly enabled, as they can be
* set to two different sensor types and we can't guess which one
* is correct for a given system. These channels can be enabled at
* run-time through the temp{1-3}_type sysfs accessors if needed. */

/* Check if voltage monitors are reset manually or by some reason */
tmp = it87_read_value(data, IT87_REG_VIN_ENABLE);
Expand Down

0 comments on commit 1edeb0e

Please sign in to comment.