Path from Kent (der_Metzger) <kent@thor.arrrr.com> to add Intel Core2

temperature sensor support to the temperature module.


SVN revision: 30863
This commit is contained in:
Christopher Michael 2007-07-16 21:27:22 +00:00
parent e12d3c3a1c
commit d58b93c45c
2 changed files with 11 additions and 1 deletions

View File

@ -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)

View File

@ -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