aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/hwmon/sysfs-interface4
-rw-r--r--drivers/hwmon/w83627hf.c19
-rw-r--r--drivers/hwmon/w83781d.c16
3 files changed, 21 insertions, 18 deletions
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index b3a9e1b9dbda..331fa7a1d7d5 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -219,12 +219,12 @@ temp[1-*]_auto_point[1-*]_temp_hyst
219**************** 219****************
220 220
221temp[1-*]_type Sensor type selection. 221temp[1-*]_type Sensor type selection.
222 Integers 1 to 6 or thermistor Beta value (typically 3435) 222 Integers 1 to 6
223 RW 223 RW
224 1: PII/Celeron Diode 224 1: PII/Celeron Diode
225 2: 3904 transistor 225 2: 3904 transistor
226 3: thermal diode 226 3: thermal diode
227 4: thermistor (default/unknown Beta) 227 4: thermistor
228 5: AMD AMDSI 228 5: AMD AMDSI
229 6: Intel PECI 229 6: Intel PECI
230 Not all types are supported by all chips 230 Not all types are supported by all chips
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,