From d58b93c45c1d56f2e86279bdaf346663e7147f90 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 16 Jul 2007 21:27:22 +0000 Subject: [PATCH] Path from Kent (der_Metzger) to add Intel Core2 temperature sensor support to the temperature module. SVN revision: 30863 --- src/modules/temperature/e_mod_main.c | 9 +++++++++ src/modules/temperature/e_mod_main.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c index bedb07f03..dc2b0398a 100644 --- a/src/modules/temperature/e_mod_main.c +++ b/src/modules/temperature/e_mod_main.c @@ -241,6 +241,11 @@ _temperature_sensor_init(Config_Face *inst) inst->sensor_type = SENSOR_TYPE_LINUX_MACMINI; inst->sensor_name = evas_stringshare_add("dummy"); } + else if (ecore_file_exists("/sys/devices/platform/coretemp.0/temp1_input")) + { + inst->sensor_type = SENSOR_TYPE_LINUX_INTELCORETEMP; + inst->sensor_name = evas_stringshare_add("dummy"); + } else { therms = temperature_get_i2c_files(); @@ -296,6 +301,9 @@ _temperature_sensor_init(Config_Face *inst) case SENSOR_TYPE_LINUX_PBOOK: inst->sensor_path = evas_stringshare_add("/sys/devices/temperatures/sensor1_temperature"); break; + case SENSOR_TYPE_LINUX_INTELCORETEMP: + inst->sensor_path = evas_stringshare_add("/sys/devices/platform/coretemp.0/temp1_input"); + break; case SENSOR_TYPE_LINUX_I2C: therms = ecore_file_ls("/sys/bus/i2c/devices"); if (therms) @@ -391,6 +399,7 @@ _temperature_cb_check(void *data) else goto error; break; + case SENSOR_TYPE_LINUX_INTELCORETEMP: case SENSOR_TYPE_LINUX_I2C: f = fopen(inst->sensor_path, "r"); if (f) diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h index 9f2078940..8be669110 100644 --- a/src/modules/temperature/e_mod_main.h +++ b/src/modules/temperature/e_mod_main.h @@ -21,7 +21,8 @@ typedef enum _Sensor_Type SENSOR_TYPE_LINUX_MACMINI, SENSOR_TYPE_LINUX_I2C, SENSOR_TYPE_LINUX_ACPI, - SENSOR_TYPE_LINUX_PBOOK + SENSOR_TYPE_LINUX_PBOOK, + SENSOR_TYPE_LINUX_INTELCORETEMP } Sensor_Type; struct _Config_Face