Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X
hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
hwmon: (adt7473) Fix some bogosity in documentation file
hwmon: Define sysfs interface for energy consumption register
hwmon: (it87) Prevent power-off on Shuttle SN68PT
eeepc-laptop: Fix hwmon interface

+83 -36
+5 -13
Documentation/hwmon/adt7473
··· 14 14 15 15 This driver implements support for the Analog Devices ADT7473 chip family. 16 16 17 - The LM85 uses the 2-wire interface compatible with the SMBUS 2.0 17 + The ADT7473 uses the 2-wire interface compatible with the SMBUS 2.0 18 18 specification. Using an analog to digital converter it measures three (3) 19 - temperatures and two (2) voltages. It has three (3) 16-bit counters for 19 + temperatures and two (2) voltages. It has four (4) 16-bit counters for 20 20 measuring fan speed. There are three (3) PWM outputs that can be used 21 21 to control fan speed. 22 22 23 23 A sophisticated control system for the PWM outputs is designed into the 24 - LM85 that allows fan speed to be adjusted automatically based on any of the 24 + ADT7473 that allows fan speed to be adjusted automatically based on any of the 25 25 three temperature sensors. Each PWM output is individually adjustable and 26 26 programmable. Once configured, the ADT7473 will adjust the PWM outputs in 27 27 response to the measured temperatures without further host intervention. ··· 46 46 The Analog Devices datasheet is very detailed and describes a procedure for 47 47 determining an optimal configuration for the automatic PWM control. 48 48 49 - Hardware Configurations 50 - ----------------------- 51 - 52 - The ADT7473 chips have an optional SMBALERT output that can be used to 53 - signal the chipset in case a limit is exceeded or the temperature sensors 54 - fail. Individual sensor interrupts can be masked so they won't trigger 55 - SMBALERT. The SMBALERT output if configured replaces the PWM2 function. 56 - 57 49 Configuration Notes 58 50 ------------------- 59 51 ··· 53 61 54 62 * PWM Control 55 63 56 - * pwm#_auto_point1_pwm and pwm#_auto_point1_temp and 57 - * pwm#_auto_point2_pwm and pwm#_auto_point2_temp - 64 + * pwm#_auto_point1_pwm and temp#_auto_point1_temp and 65 + * pwm#_auto_point2_pwm and temp#_auto_point2_temp - 58 66 59 67 point1: Set the pwm speed at a lower temperature bound. 60 68 point2: Set the pwm speed at a higher temperature bound.
+12
Documentation/hwmon/sysfs-interface
··· 329 329 Unit: microWatt 330 330 RO 331 331 332 + power[1-*]_average_interval Power use averaging interval 333 + Unit: milliseconds 334 + RW 335 + 332 336 power[1-*]_average_highest Historical average maximum power use 333 337 Unit: microWatt 334 338 RO ··· 356 352 power[1-*]_reset_history Reset input_highest, input_lowest, 357 353 average_highest and average_lowest. 358 354 WO 355 + 356 + ********** 357 + * Energy * 358 + ********** 359 + 360 + energy[1-*]_input Cumulative energy use 361 + Unit: microJoule 362 + RO 359 363 360 364 ********** 361 365 * Alarms *
+2 -1
drivers/hwmon/abituguru3.c
··· 279 279 { "OTES1 Fan", 36, 2, 60, 1, 0 }, 280 280 { NULL, 0, 0, 0, 0, 0 } } 281 281 }, 282 - { 0x0011, NULL /* Abit AT8 32X, need DMI string */, { 282 + { 0x0011, "AT8 32X(ATI RD580-ULI M1575)", { 283 283 { "CPU Core", 0, 0, 10, 1, 0 }, 284 284 { "DDR", 1, 0, 20, 1, 0 }, 285 285 { "DDR VTT", 2, 0, 10, 1, 0 }, ··· 303 303 { "SYS Fan", 34, 2, 60, 1, 0 }, 304 304 { "AUX1 Fan", 35, 2, 60, 1, 0 }, 305 305 { "AUX2 Fan", 36, 2, 60, 1, 0 }, 306 + { "AUX3 Fan", 37, 2, 60, 1, 0 }, 306 307 { NULL, 0, 0, 0, 0, 0 } } 307 308 }, 308 309 { 0x0012, NULL /* Abit AN8 32X, need DMI string */, {
+51 -19
drivers/hwmon/it87.c
··· 46 46 #include <linux/err.h> 47 47 #include <linux/mutex.h> 48 48 #include <linux/sysfs.h> 49 + #include <linux/string.h> 50 + #include <linux/dmi.h> 49 51 #include <asm/io.h> 50 52 51 53 #define DRVNAME "it87" ··· 238 236 /* Values read from Super-I/O config space */ 239 237 u8 revision; 240 238 u8 vid_value; 239 + /* Values set based on DMI strings */ 240 + u8 skip_pwm; 241 241 }; 242 242 243 243 /* For each registered chip, we need to keep some data in memory. ··· 968 964 { 969 965 int err = -ENODEV; 970 966 u16 chip_type; 967 + const char *board_vendor, *board_name; 971 968 972 969 superio_enter(); 973 970 chip_type = force_id ? force_id : superio_inw(DEVID); ··· 1025 1020 pr_info("it87: in3 is VCC (+5V)\n"); 1026 1021 if (reg & (1 << 1)) 1027 1022 pr_info("it87: in7 is VCCH (+5V Stand-By)\n"); 1023 + } 1024 + 1025 + /* Disable specific features based on DMI strings */ 1026 + board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); 1027 + board_name = dmi_get_system_info(DMI_BOARD_NAME); 1028 + if (board_vendor && board_name) { 1029 + if (strcmp(board_vendor, "nVIDIA") == 0 1030 + && strcmp(board_name, "FN68PT") == 0) { 1031 + /* On the Shuttle SN68PT, FAN_CTL2 is apparently not 1032 + connected to a fan, but to something else. One user 1033 + has reported instant system power-off when changing 1034 + the PWM2 duty cycle, so we disable it. 1035 + I use the board name string as the trigger in case 1036 + the same board is ever used in other systems. */ 1037 + pr_info("it87: Disabling pwm2 due to " 1038 + "hardware constraints\n"); 1039 + sio_data->skip_pwm = (1 << 1); 1040 + } 1028 1041 } 1029 1042 1030 1043 exit: ··· 1191 1168 } 1192 1169 1193 1170 if (enable_pwm_interface) { 1194 - if ((err = device_create_file(dev, 1195 - &sensor_dev_attr_pwm1_enable.dev_attr)) 1196 - || (err = device_create_file(dev, 1197 - &sensor_dev_attr_pwm2_enable.dev_attr)) 1198 - || (err = device_create_file(dev, 1199 - &sensor_dev_attr_pwm3_enable.dev_attr)) 1200 - || (err = device_create_file(dev, 1201 - &sensor_dev_attr_pwm1.dev_attr)) 1202 - || (err = device_create_file(dev, 1203 - &sensor_dev_attr_pwm2.dev_attr)) 1204 - || (err = device_create_file(dev, 1205 - &sensor_dev_attr_pwm3.dev_attr)) 1206 - || (err = device_create_file(dev, 1207 - &dev_attr_pwm1_freq)) 1208 - || (err = device_create_file(dev, 1209 - &dev_attr_pwm2_freq)) 1210 - || (err = device_create_file(dev, 1211 - &dev_attr_pwm3_freq))) 1212 - goto ERROR4; 1171 + if (!(sio_data->skip_pwm & (1 << 0))) { 1172 + if ((err = device_create_file(dev, 1173 + &sensor_dev_attr_pwm1_enable.dev_attr)) 1174 + || (err = device_create_file(dev, 1175 + &sensor_dev_attr_pwm1.dev_attr)) 1176 + || (err = device_create_file(dev, 1177 + &dev_attr_pwm1_freq))) 1178 + goto ERROR4; 1179 + } 1180 + if (!(sio_data->skip_pwm & (1 << 1))) { 1181 + if ((err = device_create_file(dev, 1182 + &sensor_dev_attr_pwm2_enable.dev_attr)) 1183 + || (err = device_create_file(dev, 1184 + &sensor_dev_attr_pwm2.dev_attr)) 1185 + || (err = device_create_file(dev, 1186 + &dev_attr_pwm2_freq))) 1187 + goto ERROR4; 1188 + } 1189 + if (!(sio_data->skip_pwm & (1 << 2))) { 1190 + if ((err = device_create_file(dev, 1191 + &sensor_dev_attr_pwm3_enable.dev_attr)) 1192 + || (err = device_create_file(dev, 1193 + &sensor_dev_attr_pwm3.dev_attr)) 1194 + || (err = device_create_file(dev, 1195 + &dev_attr_pwm3_freq))) 1196 + goto ERROR4; 1197 + } 1213 1198 } 1214 1199 1215 1200 if (data->type == it8712 || data->type == it8716 ··· 1577 1546 unsigned short isa_address=0; 1578 1547 struct it87_sio_data sio_data; 1579 1548 1549 + memset(&sio_data, 0, sizeof(struct it87_sio_data)); 1580 1550 err = it87_find(&isa_address, &sio_data); 1581 1551 if (err) 1582 1552 return err;
+13 -3
drivers/misc/eeepc-laptop.c
··· 450 450 int value = 0; 451 451 452 452 read_acpi_int(NULL, EEEPC_EC_FAN_PWM, &value); 453 + value = value * 255 / 100; 453 454 return (value); 454 455 } 455 456 456 457 static void eeepc_set_fan_pwm(int value) 457 458 { 458 - value = SENSORS_LIMIT(value, 0, 100); 459 + value = SENSORS_LIMIT(value, 0, 255); 460 + value = value * 100 / 255; 459 461 ec_write(EEEPC_EC_SC02, value); 460 462 } 461 463 ··· 522 520 static SENSOR_DEVICE_ATTR(_name, _mode, show_##_name, store_##_name, 0); 523 521 524 522 EEEPC_CREATE_SENSOR_ATTR(fan1_input, S_IRUGO, eeepc_get_fan_rpm, NULL); 525 - EEEPC_CREATE_SENSOR_ATTR(fan1_pwm, S_IRUGO | S_IWUSR, 523 + EEEPC_CREATE_SENSOR_ATTR(pwm1, S_IRUGO | S_IWUSR, 526 524 eeepc_get_fan_pwm, eeepc_set_fan_pwm); 527 525 EEEPC_CREATE_SENSOR_ATTR(pwm1_enable, S_IRUGO | S_IWUSR, 528 526 eeepc_get_fan_ctrl, eeepc_set_fan_ctrl); 529 527 528 + static ssize_t 529 + show_name(struct device *dev, struct device_attribute *attr, char *buf) 530 + { 531 + return sprintf(buf, "eeepc\n"); 532 + } 533 + static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0); 534 + 530 535 static struct attribute *hwmon_attributes[] = { 531 - &sensor_dev_attr_fan1_pwm.dev_attr.attr, 536 + &sensor_dev_attr_pwm1.dev_attr.attr, 532 537 &sensor_dev_attr_fan1_input.dev_attr.attr, 533 538 &sensor_dev_attr_pwm1_enable.dev_attr.attr, 539 + &sensor_dev_attr_name.dev_attr.attr, 534 540 NULL 535 541 }; 536 542