mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] thermal/of: Initialize the thermal governor for configuring thermal zones.
@ 2022-10-10 10:17 Qibo Huang
  2022-10-10 16:44 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Qibo Huang @ 2022-10-10 10:17 UTC (permalink / raw)
  To: rafael
  Cc: amitk, rui.zhang, linux-pm, linux-kernel, daniel.lezcano, Qibo Huang

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@gmail.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-10 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 10:17 [PATCH] thermal/of: Initialize the thermal governor for configuring thermal zones Qibo Huang
2022-10-10 16:44 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®