From: Qibo Huang <huangqibo.tech@gmail.com>
To: rafael@kernel.org
Cc: amitk@kernel.org, rui.zhang@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org,
Qibo Huang <huangqibo.tech@gmail.com>
Subject: [PATCH] thermal/of: Initialize the thermal governor for configuring thermal zones.
Date: Mon, 10 Oct 2022 18:17:08 +0800 [thread overview]
Message-ID: <20221010101708.12565-1-huangqibo.tech@gmail.com> (raw)
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
next reply other threads:[~2022-10-10 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 10:17 Qibo Huang [this message]
2022-10-10 16:44 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221010101708.12565-1-huangqibo.tech@gmail.com \
--to=huangqibo.tech@gmail.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®