From ce119f83257aae29b84a5bfad0669e8348437b18 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Wed, 27 Jun 2012 14:13:04 +0800 Subject: Thermal: Introduce simple arbitrator for setting device cooling state This fixes the problem that a cooling device may be referenced by by multiple trip points in multiple thermal zones. With this patch, we have two stages for updating a thermal zone, 1. check if a thermal_instance needs to be updated or not 2. update the cooling device, based on the target cooling state of all its instances. Note that, currently, the cooling device is set to the deepest cooling state required. Signed-off-by: Zhang Rui Reviewed-by: Rafael J. Wysocki Reviewed-by: Eduardo Valentin --- include/linux/thermal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/thermal.h') diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 9ae378a4a555..de0515a96f9f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -94,6 +94,7 @@ struct thermal_cooling_device { struct device device; void *devdata; const struct thermal_cooling_device_ops *ops; + bool updated; /* true if the cooling device does not need update */ struct list_head thermal_instances; struct list_head node; }; -- cgit v1.2.1