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 <rui.zhang@intel.com> Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Eduardo Valentin <eduardo.valentin@ti.com>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user