From 9e0b2db23b67a3d98004a1d68f0dc3a950da93bd Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Wed, 2 Oct 2013 12:23:27 -0600 Subject: thermal: Add Support for enabling and disabling tsens trip Add new API to enable or disable the kernel client's trip threshold request. The enable or disable trip threshold requests from different kernel clients and userspace client will activate/deactivate the corresponding clients threshold request. Modify thermal sys framework to include only the active thresholds from clients to determine the current trip thresholds for tsens. CRs-Fixed: 561775 Change-Id: I304ac00daa8a0a1a68b60153c29ee6cb5c3507b1 Signed-off-by: Ram Chandrasekar [joshc: drop msm_thermal chunk] Signed-off-by: Josh Cartwright --- include/linux/thermal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 2bab7a26db20..89de2ca82974 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -158,6 +158,7 @@ struct sensor_threshold { enum thermal_trip_type trip; int (*notify)(enum thermal_trip_type type, int temp, void *data); void *data; + uint8_t active; struct list_head list; }; @@ -449,6 +450,8 @@ void thermal_notify_framework(struct thermal_zone_device *, int); int sensor_get_id(char *name); int sensor_set_trip(uint32_t sensor_id, struct sensor_threshold *threshold); int sensor_cancel_trip(uint32_t sensor_id, struct sensor_threshold *threshold); +int sensor_activate_trip(uint32_t sensor_id, struct sensor_threshold *threshold, + bool enable); int thermal_sensor_trip(struct thermal_zone_device *tz, enum thermal_trip_type trip, long temp); -- cgit v1.2.3