diff options
Diffstat (limited to 'drivers/hwmon/w83781d.c')
-rw-r--r-- | drivers/hwmon/w83781d.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index 8ed88f3d5767..c12bdf9d9e1d 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c | |||
@@ -251,9 +251,7 @@ struct w83781d_data { | |||
251 | u8 pwm2_enable; /* Boolean */ | 251 | u8 pwm2_enable; /* Boolean */ |
252 | u16 sens[3]; /* 782D/783S only. | 252 | u16 sens[3]; /* 782D/783S only. |
253 | 1 = pentium diode; 2 = 3904 diode; | 253 | 1 = pentium diode; 2 = 3904 diode; |
254 | 3000-5000 = thermistor beta. | 254 | 4 = thermistor */ |
255 | Default = 3435. | ||
256 | Other Betas unimplemented */ | ||
257 | u8 vrm; | 255 | u8 vrm; |
258 | }; | 256 | }; |
259 | 257 | ||
@@ -721,15 +719,19 @@ store_sensor(struct device *dev, struct device_attribute *da, | |||
721 | tmp & ~BIT_SCFG2[nr]); | 719 | tmp & ~BIT_SCFG2[nr]); |
722 | data->sens[nr] = val; | 720 | data->sens[nr] = val; |
723 | break; | 721 | break; |
724 | case W83781D_DEFAULT_BETA: /* thermistor */ | 722 | case W83781D_DEFAULT_BETA: |
723 | dev_warn(dev, "Sensor type %d is deprecated, please use 4 " | ||
724 | "instead\n", W83781D_DEFAULT_BETA); | ||
725 | /* fall through */ | ||
726 | case 4: /* thermistor */ | ||
725 | tmp = w83781d_read_value(data, W83781D_REG_SCFG1); | 727 | tmp = w83781d_read_value(data, W83781D_REG_SCFG1); |
726 | w83781d_write_value(data, W83781D_REG_SCFG1, | 728 | w83781d_write_value(data, W83781D_REG_SCFG1, |
727 | tmp & ~BIT_SCFG1[nr]); | 729 | tmp & ~BIT_SCFG1[nr]); |
728 | data->sens[nr] = val; | 730 | data->sens[nr] = val; |
729 | break; | 731 | break; |
730 | default: | 732 | default: |
731 | dev_err(dev, "Invalid sensor type %ld; must be 1, 2, or %d\n", | 733 | dev_err(dev, "Invalid sensor type %ld; must be 1, 2, or 4\n", |
732 | (long) val, W83781D_DEFAULT_BETA); | 734 | (long) val); |
733 | break; | 735 | break; |
734 | } | 736 | } |
735 | 737 | ||
@@ -1485,7 +1487,7 @@ w83781d_init_device(struct device *dev) | |||
1485 | tmp = w83781d_read_value(data, W83781D_REG_SCFG1); | 1487 | tmp = w83781d_read_value(data, W83781D_REG_SCFG1); |
1486 | for (i = 1; i <= 3; i++) { | 1488 | for (i = 1; i <= 3; i++) { |
1487 | if (!(tmp & BIT_SCFG1[i - 1])) { | 1489 | if (!(tmp & BIT_SCFG1[i - 1])) { |
1488 | data->sens[i - 1] = W83781D_DEFAULT_BETA; | 1490 | data->sens[i - 1] = 4; |
1489 | } else { | 1491 | } else { |
1490 | if (w83781d_read_value | 1492 | if (w83781d_read_value |
1491 | (data, | 1493 | (data, |