]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
hwmon: Don't export thermistor beta
authorJean Delvare <khali@linux-fr.org>
Thu, 16 Aug 2007 12:30:01 +0000 (14:30 +0200)
committerMark M. Hoffman <mhoffman@lightlink.com>
Wed, 10 Oct 2007 02:56:29 +0000 (22:56 -0400)
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>
Documentation/hwmon/sysfs-interface
drivers/hwmon/w83627hf.c
drivers/hwmon/w83781d.c

index b3a9e1b9dbda9458b5d4215f50b3b217284c3b82..331fa7a1d7d543a4fed25102822fe4eee5025d24 100644 (file)
@@ -219,12 +219,12 @@ temp[1-*]_auto_point[1-*]_temp_hyst
 ****************
 
 temp[1-*]_type Sensor type selection.
-               Integers 1 to 6 or thermistor Beta value (typically 3435)
+               Integers 1 to 6
                RW
                1: PII/Celeron Diode
                2: 3904 transistor
                3: thermal diode
-               4: thermistor (default/unknown Beta)
+               4: thermistor
                5: AMD AMDSI
                6: Intel PECI
                Not all types are supported by all chips
index 0866739a227cd437e91a7008d6832e735c41a500..f0e0e208be9a60b10cfd2aa3b0c167e75b8c4ec8 100644 (file)
@@ -372,11 +372,8 @@ struct w83627hf_data {
        u8 beep_enable;         /* Boolean */
        u8 pwm[3];              /* Register value */
        u8 pwm_freq[3];         /* Register value */
-       u16 sens[3];            /* 782D/783S only.
-                                  1 = pentium diode; 2 = 3904 diode;
-                                  3000-5000 = thermistor beta.
-                                  Default = 3435.
-                                  Other Betas unimplemented */
+       u16 sens[3];            /* 1 = pentium diode; 2 = 3904 diode;
+                                  4 = thermistor */
        u8 vrm;
        u8 vrm_ovt;             /* Register value, 627THF/637HF/687THF only */
 };
@@ -1001,7 +998,11 @@ store_sensor_reg(struct device *dev, const char *buf, size_t count, int nr)
                                    tmp & ~BIT_SCFG2[nr - 1]);
                data->sens[nr - 1] = val;
                break;
-       case W83781D_DEFAULT_BETA:      /* thermistor */
+       case W83781D_DEFAULT_BETA:
+               dev_warn(dev, "Sensor type %d is deprecated, please use 4 "
+                        "instead\n", W83781D_DEFAULT_BETA);
+               /* fall through */
+       case 4:         /* thermistor */
                tmp = w83627hf_read_value(data, W83781D_REG_SCFG1);
                w83627hf_write_value(data, W83781D_REG_SCFG1,
                                    tmp & ~BIT_SCFG1[nr - 1]);
@@ -1009,8 +1010,8 @@ store_sensor_reg(struct device *dev, const char *buf, size_t count, int nr)
                break;
        default:
                dev_err(dev,
-                      "Invalid sensor type %ld; must be 1, 2, or %d\n",
-                      (long) val, W83781D_DEFAULT_BETA);
+                      "Invalid sensor type %ld; must be 1, 2, or 4\n",
+                      (long) val);
                break;
        }
 
@@ -1513,7 +1514,7 @@ static void __devinit w83627hf_init_device(struct platform_device *pdev)
        tmp = w83627hf_read_value(data, W83781D_REG_SCFG1);
        for (i = 1; i <= 3; i++) {
                if (!(tmp & BIT_SCFG1[i - 1])) {
-                       data->sens[i - 1] = W83781D_DEFAULT_BETA;
+                       data->sens[i - 1] = 4;
                } else {
                        if (w83627hf_read_value
                            (data,
index 8ed88f3d57673135ae4e383f85982b7cdc221a4f..c12bdf9d9e1d18de8ad4bd37b8a452797d251df8 100644 (file)
@@ -251,9 +251,7 @@ struct w83781d_data {
        u8 pwm2_enable;         /* Boolean */
        u16 sens[3];            /* 782D/783S only.
                                   1 = pentium diode; 2 = 3904 diode;
-                                  3000-5000 = thermistor beta.
-                                  Default = 3435. 
-                                  Other Betas unimplemented */
+                                  4 = thermistor */
        u8 vrm;
 };
 
@@ -721,15 +719,19 @@ store_sensor(struct device *dev, struct device_attribute *da,
                                    tmp & ~BIT_SCFG2[nr]);
                data->sens[nr] = val;
                break;
-       case W83781D_DEFAULT_BETA:      /* thermistor */
+       case W83781D_DEFAULT_BETA:
+               dev_warn(dev, "Sensor type %d is deprecated, please use 4 "
+                        "instead\n", W83781D_DEFAULT_BETA);
+               /* fall through */
+       case 4:         /* thermistor */
                tmp = w83781d_read_value(data, W83781D_REG_SCFG1);
                w83781d_write_value(data, W83781D_REG_SCFG1,
                                    tmp & ~BIT_SCFG1[nr]);
                data->sens[nr] = val;
                break;
        default:
-               dev_err(dev, "Invalid sensor type %ld; must be 1, 2, or %d\n",
-                      (long) val, W83781D_DEFAULT_BETA);
+               dev_err(dev, "Invalid sensor type %ld; must be 1, 2, or 4\n",
+                      (long) val);
                break;
        }
 
@@ -1485,7 +1487,7 @@ w83781d_init_device(struct device *dev)
                tmp = w83781d_read_value(data, W83781D_REG_SCFG1);
                for (i = 1; i <= 3; i++) {
                        if (!(tmp & BIT_SCFG1[i - 1])) {
-                               data->sens[i - 1] = W83781D_DEFAULT_BETA;
+                               data->sens[i - 1] = 4;
                        } else {
                                if (w83781d_read_value
                                    (data,