aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/temperature/tempget.c
diff options
context:
space:
mode:
authorLars Munch <lars@segv.dk>2011-01-16 15:11:56 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-16 15:11:56 +0000
commit343f3737b1afb44325a56b30789313f51dd14633 (patch)
tree317c4712ce1fc4066d50fce3425429c739235d15 /src/modules/temperature/tempget.c
parentupdating various translations (diff)
downloadenlightenment-343f3737b1afb44325a56b30789313f51dd14633.tar.gz
This adds thinkpad support to the temperature module. The temperature is
accessible through the thinkpad_acpi kernel module. Signed-off-by: Lars Munch <lars@segv.dk> SVN revision: 56192
Diffstat (limited to 'src/modules/temperature/tempget.c')
-rw-r--r--src/modules/temperature/tempget.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/temperature/tempget.c b/src/modules/temperature/tempget.c
index b98b6abdc..99495a3c3 100644
--- a/src/modules/temperature/tempget.c
+++ b/src/modules/temperature/tempget.c
@@ -125,6 +125,11 @@ init(void)
sensor_type = SENSOR_TYPE_LINUX_INTELCORETEMP;
sensor_name = strdup("dummy");
}
+ else if (ecore_file_exists("/sys/devices/platform/thinkpad_hwmon/temp1_input"))
+ {
+ sensor_type = SENSOR_TYPE_LINUX_THINKPAD;
+ sensor_name = strdup("dummy");
+ }
else
{
// try the i2c bus
@@ -217,6 +222,9 @@ init(void)
case SENSOR_TYPE_LINUX_INTELCORETEMP:
sensor_path = strdup("/sys/devices/platform/coretemp.0/temp1_input");
break;
+ case SENSOR_TYPE_LINUX_THINKPAD:
+ sensor_path = strdup("/sys/devices/platform/thinkpad_hwmon/temp1_input");
+ break;
case SENSOR_TYPE_LINUX_I2C:
therms = ecore_file_ls("/sys/bus/i2c/devices");
@@ -330,6 +338,7 @@ check(void)
break;
case SENSOR_TYPE_LINUX_INTELCORETEMP:
case SENSOR_TYPE_LINUX_I2C:
+ case SENSOR_TYPE_LINUX_THINKPAD:
f = fopen(sensor_path, "r");
if (f)
{