summaryrefslogtreecommitdiffstats
path: root/drivers/misc/thinkpad_acpi.h
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-04-24 11:48:16 -0300
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 a9feb53c6d3..e833ff3caf3 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -38,6 +38,7 @@
#include <linux/fb.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
#include <asm/uaccess.h>
#include <linux/dmi.h>
@@ -467,6 +468,7 @@ enum thermal_access_mode {
enum { /* TPACPI_THERMAL_TPEC_* */
TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */
TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */
+ TP_EC_THERMAL_TMP_NA = -128, /* ACPI EC sensor not available */
};
#define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */