From 16bd6b455c06cab7a92453abd7be0cc2171e6a39 Mon Sep 17 00:00:00 2001 From: Park Chungwoo Date: Wed, 9 Mar 2016 14:35:36 +0900 Subject: [PATCH] thermal: of-thermal: Add governor parsing from device-tree Change-Id: Ia63bc75ab4595bcf969402c8ea737cb8289b8292 Signed-off-by: Park Chungwoo Signed-off-by: Hyeonseong Gil --- drivers/thermal/of-thermal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index d04ec3b9e5ff..6c33f9c09d6a 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -973,6 +973,7 @@ int __init of_parse_thermal_zones(void) for_each_available_child_of_node(np, child) { struct thermal_zone_device *zone; struct thermal_zone_params *tzp; + const char *governor_name; int i, mask = 0; u32 prop; @@ -1007,6 +1008,9 @@ int __init of_parse_thermal_zones(void) tzp->slope = tz->slope; tzp->offset = tz->offset; + if (!of_property_read_string(child, "governor", &governor_name)) + strncpy(tzp->governor_name, governor_name, THERMAL_NAME_LENGTH); + zone = thermal_zone_device_register(child->name, tz->ntrips, mask, tz, ops, tzp, -- 2.20.1