diff options
author | Amit Daniel Kachhap <amit.kachhap@linaro.org> | 2011-12-21 15:23:55 +0530 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-01-11 22:09:06 +0400 |
commit | 6437b2693ca0bdafb9264b939cb9a1b9fcac0856 (patch) | |
tree | 962ef02ed70d54a9744511e117f83ee758d30283 /include | |
parent | 807ebf2427a3f208338d49b7d6b66ff115e8cb72 (diff) |
thermal: exynos: Add thermal interface support for linux thermal layer
This codes uses the generic linux thermal layer and creates a bridge
between temperature sensors, linux thermal framework and cooling devices
for samsung exynos platform. This layer recieves or monitor the
temperature from the sensor and informs the generic thermal layer to take
the necessary cooling action.
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/exynos_thermal.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/linux/exynos_thermal.h b/include/linux/exynos_thermal.h new file mode 100644 index 00000000000..de7195b3a18 --- /dev/null +++ b/include/linux/exynos_thermal.h @@ -0,0 +1,59 @@ +/* linux/include/linux/exynos_thermal.h + * + * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#ifndef THERMAL_INTERFACE_H +#define THERMAL_INTERFACE_H +/* CPU Zone information */ + +#define SENSOR_NAME_LEN 16 + +#define PANIC_ZONE 4 +#define WARN_ZONE 3 +#define MONITOR_ZONE 2 +#define SAFE_ZONE 1 +#define NO_ACTION 0 + +/** + * struct exynos4_tmu_platform_data + * @name: name of the temperature sensor + * @read_temperature: A function pointer to read temperature info + * @private_data: Temperature sensor private data + * @sensor_data: Sensor specific information like trigger temperature, level + */ +struct thermal_sensor_conf { + char name[SENSOR_NAME_LEN]; + int (*read_temperature)(void *data); + void *private_data; + void *sensor_data; +}; + +/** + * exynos4_register_thermal: Register to the exynos thermal interface. + * @sensor_conf: Structure containing temperature sensor information + * + * returns zero on success, else negative errno. + */ +int exynos4_register_thermal(struct thermal_sensor_conf *sensor_conf); + +/** + * exynos4_unregister_thermal: Un-register from the exynos thermal interface. + * + * return not applicable. + */ +void exynos4_unregister_thermal(void); + +/** + * exynos4_report_trigger: Report any trigger level crossed in the + * temperature sensor. This may be useful to take any cooling action. + * + * return not applicable. + */ +extern void exynos4_report_trigger(void); +#endif |