This patch adds a new flag and init function for thermal_instance
in order to provide connection with scheduler.
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
#include <linux/thermal.h>
#include <linux/reboot.h>
#include <linux/string.h>
+#include <linux/sched/power.h>
#include <linux/of.h>
#include <net/netlink.h>
#include <net/genetlink.h>
}
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
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) \