aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/it87.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 1002befd87d5..5e39e2d40380 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -545,6 +545,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
545 545
546 mutex_lock(&data->update_lock); 546 mutex_lock(&data->update_lock);
547 547
548 data->sensor = it87_read_value(data, IT87_REG_TEMP_ENABLE);
548 data->sensor &= ~(1 << nr); 549 data->sensor &= ~(1 << nr);
549 data->sensor &= ~(8 << nr); 550 data->sensor &= ~(8 << nr);
550 if (val == 2) { /* backwards compatibility */ 551 if (val == 2) { /* backwards compatibility */
@@ -1841,14 +1842,10 @@ static void __devinit it87_init_device(struct platform_device *pdev)
1841 it87_write_value(data, IT87_REG_TEMP_HIGH(i), 127); 1842 it87_write_value(data, IT87_REG_TEMP_HIGH(i), 127);
1842 } 1843 }
1843 1844
1844 /* Check if temperature channels are reset manually or by some reason */ 1845 /* Temperature channels are not forcibly enabled, as they can be
1845 tmp = it87_read_value(data, IT87_REG_TEMP_ENABLE); 1846 * set to two different sensor types and we can't guess which one
1846 if ((tmp & 0x3f) == 0) { 1847 * is correct for a given system. These channels can be enabled at
1847 /* Temp1,Temp3=thermistor; Temp2=thermal diode */ 1848 * run-time through the temp{1-3}_type sysfs accessors if needed. */
1848 tmp = (tmp & 0xc0) | 0x2a;
1849 it87_write_value(data, IT87_REG_TEMP_ENABLE, tmp);
1850 }
1851 data->sensor = tmp;
1852 1849
1853 /* Check if voltage monitors are reset manually or by some reason */ 1850 /* Check if voltage monitors are reset manually or by some reason */
1854 tmp = it87_read_value(data, IT87_REG_VIN_ENABLE); 1851 tmp = it87_read_value(data, IT87_REG_VIN_ENABLE);