diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-04-21 10:08:43 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-04-21 23:30:34 -0400 |
commit | 04cc862c1893a055ab1117fa6f3aa0886c0ba032 (patch) | |
tree | d0a534ae721641b1212441196690315a30c382ad /drivers/misc/thinkpad_acpi.h | |
parent | c9bea99c1a712548db3437cbca52b0da8f30069c (diff) |
ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversion
Clean-up the thermal subdriver for sysfs conversion. Make thermal_get_*
reentrancy-safe while at it, and add the missing thermal_read_mode variable
to the header file.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.h')
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index fb0abb02a016..6432b28339af 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -427,12 +427,20 @@ enum thermal_access_mode { | |||
427 | TPACPI_THERMAL_TPEC_16, /* Use ACPI EC regs, 16 sensors */ | 427 | TPACPI_THERMAL_TPEC_16, /* Use ACPI EC regs, 16 sensors */ |
428 | }; | 428 | }; |
429 | 429 | ||
430 | enum { /* TPACPI_THERMAL_TPEC_* */ | ||
431 | TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */ | ||
432 | TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */ | ||
433 | }; | ||
434 | |||
430 | #define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */ | 435 | #define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */ |
431 | struct ibm_thermal_sensors_struct { | 436 | struct ibm_thermal_sensors_struct { |
432 | s32 temp[TPACPI_MAX_THERMAL_SENSORS]; | 437 | s32 temp[TPACPI_MAX_THERMAL_SENSORS]; |
433 | }; | 438 | }; |
434 | 439 | ||
440 | static enum thermal_access_mode thermal_read_mode; | ||
441 | |||
435 | static int thermal_init(struct ibm_init_struct *iibm); | 442 | static int thermal_init(struct ibm_init_struct *iibm); |
443 | static int thermal_get_sensor(int idx, s32 *value); | ||
436 | static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s); | 444 | static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s); |
437 | static int thermal_read(char *p); | 445 | static int thermal_read(char *p); |
438 | 446 | ||