aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/thinkpad_acpi.h
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-04-24 10:48:16 -0400
committerLen Brown <len.brown@intel.com>2007-04-25 02:00:27 -0400
commit2c37aa4e22dd55070c608290c5031f2ee93e69ce (patch)
treeab8a0c05c4a3e51e6f111d3377393b766d4e39a2 /drivers/misc/thinkpad_acpi.h
parent40ca9fdf8aa7d929e2b8939be1e6380d107381e1 (diff)
ACPI: thinkpad-acpi: add sysfs support to the thermal subdriver
Export thinkpad thermal sensors to sysfs, following the hwmon specification for thermal monitoring sensors. ThinkPad thermal monitoring is done by the EC. Sensors can show up or disappear at runtime when they are inside hotswappable hardware, such as batteries. Sensors that are not available return -ENXIO when accessed. Up to 16 thermal sensors are supported on new firmware (but nobody has reported a ThinkPad with more than 12 sensors so far), and 8 sensors are supported on older firmware. Thermal sensor mapping is model-specific. Precision varies, it is 1 degree Celcius on new ThinkPads, but higher on some older models. 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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index a9feb53c6d3c..e833ff3caf39 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -38,6 +38,7 @@
38#include <linux/fb.h> 38#include <linux/fb.h>
39#include <linux/platform_device.h> 39#include <linux/platform_device.h>
40#include <linux/hwmon.h> 40#include <linux/hwmon.h>
41#include <linux/hwmon-sysfs.h>
41#include <asm/uaccess.h> 42#include <asm/uaccess.h>
42 43
43#include <linux/dmi.h> 44#include <linux/dmi.h>
@@ -467,6 +468,7 @@ enum thermal_access_mode {
467enum { /* TPACPI_THERMAL_TPEC_* */ 468enum { /* TPACPI_THERMAL_TPEC_* */
468 TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */ 469 TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */
469 TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */ 470 TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */
471 TP_EC_THERMAL_TMP_NA = -128, /* ACPI EC sensor not available */
470}; 472};
471 473
472#define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */ 474#define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */