forked from enlightenment/enlightenment
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:
parent
e12d3c3a1c
commit
d58b93c45c
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue