[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Oct 2022 18:17:08 +0800
From: Qibo Huang <huangqibo.tech@...il.com>
To: rafael@...nel.org
Cc: amitk@...nel.org, rui.zhang@...el.com, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, daniel.lezcano@...aro.org,
Qibo Huang <huangqibo.tech@...il.com>
Subject: [PATCH] thermal/of: Initialize the thermal governor for configuring thermal zones.
Configure the initial thermal governor of thermal zones on the device tree.
Since the kernel provides a variety of thermal governors,
to a certain extent,thermal governor is also a specific hardware property
of thermal zones.
Signed-off-by: Qibo Huang <huangqibo.tech@...il.com>
---
drivers/thermal/thermal_of.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index fd2fb84bf246..617b5ac030b4 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -404,6 +404,11 @@ static struct thermal_zone_params *thermal_of_parameters_init(struct device_node
if (!tzp)
return ERR_PTR(-ENOMEM);
+ if (!of_property_read_string(child, "thermal-governor",
+ &governor_name))
+ strscpy(tzp->governor_name, governor_name,
+ THERMAL_NAME_LENGTH);
+
tzp->no_hwmon = true;
if (!of_property_read_u32(np, "sustainable-power", &prop))
--
2.37.1
Powered by blists - more mailing lists