diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-08-16 08:30:01 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-10-09 22:56:29 -0400 |
commit | b26f93309282bdfebb3edb8939e022a4bbe56dfe (patch) | |
tree | 639c84137751e908b192de9586f8dc3ecefe718d /drivers | |
parent | 5bfedac045082a97e20d47d876071279ef984d28 (diff) |
hwmon: Don't export thermistor beta
Deprecate the use of thermistor beta values as thermal sensor types.
No driver supports changing the beta value anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/w83627hf.c | 19 | ||||
-rw-r--r-- | drivers/hwmon/w83781d.c | 16 |
2 files changed, 19 insertions, 16 deletions
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 0866739a227c..f0e0e208be9a 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c | |||
@@ -372,11 +372,8 @@ struct w83627hf_data { | |||
372 | u8 beep_enable; /* Boolean */ | 372 | u8 beep_enable; /* Boolean */ |
373 | u8 pwm[3]; /* Register value */ | 373 | u8 pwm[3]; /* Register value */ |
374 | u8 pwm_freq[3]; /* Register value */ | 374 | u8 pwm_freq[3]; /* Register value */ |
375 | u16 sens[3]; /* 782D/783S only. | 375 | u16 sens[3]; /* 1 = pentium diode; 2 = 3904 diode; |
376 | 1 = pentium diode; 2 = 3904 diode; | 376 | 4 = thermistor */ |
377 | 3000-5000 = thermistor beta. | ||
378 | Default = 3435. | ||
379 | Other Betas unimplemented */ | ||
380 | u8 vrm; | 377 | u8 vrm; |
381 | u8 vrm_ovt; /* Register value, 627THF/637HF/687THF only */ | 378 | u8 vrm_ovt; /* Register value, 627THF/637HF/687THF only */ |
382 | }; | 379 | }; |
@@ -1001,7 +998,11 @@ store_sensor_reg(struct device *dev, const char *buf, size_t count, int nr) | |||
1001 | tmp & ~BIT_SCFG2[nr - 1]); | 998 | tmp & ~BIT_SCFG2[nr - 1]); |
1002 | data->sens[nr - 1] = val; | 999 | data->sens[nr - 1] = val; |
1003 | break; | 1000 | break; |
1004 | case W83781D_DEFAULT_BETA: /* thermistor */ | 1001 | case W83781D_DEFAULT_BETA: |
1002 | dev_warn(dev, "Sensor type %d is deprecated, please use 4 " | ||
1003 | "instead\n", W83781D_DEFAULT_BETA); | ||
1004 | /* fall through */ | ||
1005 | case 4: /* thermistor */ | ||
1005 | tmp = w83627hf_read_value(data, W83781D_REG_SCFG1); | 1006 | tmp = w83627hf_read_value(data, W83781D_REG_SCFG1); |
1006 | w83627hf_write_value(data, W83781D_REG_SCFG1, | 1007 | w83627hf_write_value(data, W83781D_REG_SCFG1, |
1007 | tmp & ~BIT_SCFG1[nr - 1]); | 1008 | tmp & ~BIT_SCFG1[nr - 1]); |
@@ -1009,8 +1010,8 @@ store_sensor_reg(struct device *dev, const char *buf, size_t count, int nr) | |||
1009 | break; | 1010 | break; |
1010 | default: | 1011 | default: |
1011 | dev_err(dev, | 1012 | dev_err(dev, |
1012 | "Invalid sensor type %ld; must be 1, 2, or %d\n", | 1013 | "Invalid sensor type %ld; must be 1, 2, or 4\n", |
1013 | (long) val, W83781D_DEFAULT_BETA); | 1014 | (long) val); |
1014 | break; | 1015 | break; |
1015 | } | 1016 | } |
1016 | 1017 | ||
@@ -1513,7 +1514,7 @@ static void __devinit w83627hf_init_device(struct platform_device *pdev) | |||
1513 | tmp = w83627hf_read_value(data, W83781D_REG_SCFG1); | 1514 | tmp = w83627hf_read_value(data, W83781D_REG_SCFG1); |
1514 | for (i = 1; i <= 3; i++) { | 1515 | for (i = 1; i <= 3; i++) { |
1515 | if (!(tmp & BIT_SCFG1[i - 1])) { | 1516 | if (!(tmp & BIT_SCFG1[i - 1])) { |
1516 | data->sens[i - 1] = W83781D_DEFAULT_BETA; | 1517 | data->sens[i - 1] = 4; |
1517 | } else { | 1518 | } else { |
1518 | if (w83627hf_read_value | 1519 | if (w83627hf_read_value |
1519 | (data, | 1520 | (data, |
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, |