From: Lukasz Luba Date: Thu, 25 Oct 2018 16:24:46 +0000 (+0200) Subject: thermal: add sched driven feature to thermal_instance X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29cf37c307f5b885e233559e1948384e07608bee;p=platform%2Fkernel%2Flinux-exynos.git thermal: add sched driven feature to thermal_instance This patch adds a new flag and init function for thermal_instance in order to provide connection with scheduler. Signed-off-by: Lukasz Luba --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 2fc143ac8552..a3d80553b590 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -837,6 +838,11 @@ update: } EXPORT_SYMBOL_GPL(thermal_cpu_cdev_set_weight); +static void thermal_cpu_cdev_init_weight(int cpu, unsigned int weight) +{ + sched_power_cpu_reinit_weight(cpu, weight); +} + /** * thermal_zone_unbind_cooling_device() - unbind a cooling device from a diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 0df190ed82a7..f6ccd8fc2ba5 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -37,6 +37,7 @@ struct thermal_instance { struct list_head tz_node; /* node in tz->thermal_instances */ struct list_head cdev_node; /* node in cdev->thermal_instances */ unsigned int weight; /* The weight of the cooling device */ + bool sched_driven; }; #define to_thermal_zone(_dev) \