From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: "Chung-Yih Wang (王崇懿)" <cywang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Eduardo Valentin
<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] thermal: of: Introduce governor selection in dts
Date: Fri, 7 Aug 2015 11:31:21 +0100 [thread overview]
Message-ID: <20150807103121.GC7646@leverpostej> (raw)
In-Reply-To: <CAM2ehZYXsqCoS9ygXNfPHxt9-b5cFxH_ovrgjvM-BfDO6REcUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, Aug 07, 2015 at 08:09:39AM +0100, Chung-Yih Wang (王崇懿) wrote:
> As there could be more thermal zones on a system and
> more variety in thermal governors provided in kernel,
> this patch provides flexibility of governor selection
> for a thermal zone declared in device tree.
>
> Change-Id: Ie4a75d762709cbbe9f1806dae325d13f71982e78
> Signed-off-by: Chung-yih Wang <cywang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
> Documentation/devicetree/bindings/thermal/thermal.txt | 9 +++++++++
> drivers/thermal/of-thermal.c | 10 ++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
> b/Documentation/devicetree/bindings/thermal/thermal.txt
> index 8a49362..30a5d41 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -174,6 +174,13 @@ Optional property:
> 2000mW, while on a 10'' tablet is around
> 4500mW.
>
> +- thermal-governor-name: The name of governor used to control the
> + thermal zone instead of the default one
> + specified in kernel config. For reference, if
> + default governor is step_wise, one could
> + select power_allocator for cpu_thermal zone
> + in dts.
This is not a hardware or system property, but rather a Linux
implementation detail.
This really shouldn't go in the DT.
Mark.
> +
> Note: The delay properties are bound to the maximum dT/dt (temperature
> derivative over time) in two situations for a thermal zone:
> (i) - when passive cooling is activated (polling-delay-passive); and
> @@ -555,6 +562,8 @@ thermal-zones {
>
> sustainable-power = <2500>;
>
> + thermal-governor-name = "power_allocator";
> +
> trips {
> /* Trips are based on resulting linear equation */
> cpu_trip: cpu-trip {
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index b295b2b..45570ac 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -882,6 +882,7 @@ int __init of_parse_thermal_zones(void)
> }
>
> for_each_child_of_node(np, child) {
> + const char *governor_name;
> struct thermal_zone_device *zone;
> struct thermal_zone_params *tzp;
> int i, mask = 0;
> @@ -909,6 +910,15 @@ int __init of_parse_thermal_zones(void)
> goto exit_free;
> }
>
> + /* Select a preferred governor if declared */
> + if (!of_property_read_string(child,
> + "thermal-governor-name",
> + &governor_name)) {
> + strncpy(tzp->governor_name,
> + governor_name,
> + sizeof(tzp->governor_name) - 1);
> + }
> +
> /* No hwmon because there might be hwmon drivers registering */
> tzp->no_hwmon = true;
>
> --
> 2.1.2
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: "Chung-Yih Wang (王崇懿)" <cywang@chromium.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <Pawel.Moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] thermal: of: Introduce governor selection in dts
Date: Fri, 7 Aug 2015 11:31:21 +0100 [thread overview]
Message-ID: <20150807103121.GC7646@leverpostej> (raw)
In-Reply-To: <CAM2ehZYXsqCoS9ygXNfPHxt9-b5cFxH_ovrgjvM-BfDO6REcUg@mail.gmail.com>
On Fri, Aug 07, 2015 at 08:09:39AM +0100, Chung-Yih Wang (王崇懿) wrote:
> As there could be more thermal zones on a system and
> more variety in thermal governors provided in kernel,
> this patch provides flexibility of governor selection
> for a thermal zone declared in device tree.
>
> Change-Id: Ie4a75d762709cbbe9f1806dae325d13f71982e78
> Signed-off-by: Chung-yih Wang <cywang@chromium.org>
> ---
> Documentation/devicetree/bindings/thermal/thermal.txt | 9 +++++++++
> drivers/thermal/of-thermal.c | 10 ++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
> b/Documentation/devicetree/bindings/thermal/thermal.txt
> index 8a49362..30a5d41 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -174,6 +174,13 @@ Optional property:
> 2000mW, while on a 10'' tablet is around
> 4500mW.
>
> +- thermal-governor-name: The name of governor used to control the
> + thermal zone instead of the default one
> + specified in kernel config. For reference, if
> + default governor is step_wise, one could
> + select power_allocator for cpu_thermal zone
> + in dts.
This is not a hardware or system property, but rather a Linux
implementation detail.
This really shouldn't go in the DT.
Mark.
> +
> Note: The delay properties are bound to the maximum dT/dt (temperature
> derivative over time) in two situations for a thermal zone:
> (i) - when passive cooling is activated (polling-delay-passive); and
> @@ -555,6 +562,8 @@ thermal-zones {
>
> sustainable-power = <2500>;
>
> + thermal-governor-name = "power_allocator";
> +
> trips {
> /* Trips are based on resulting linear equation */
> cpu_trip: cpu-trip {
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index b295b2b..45570ac 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -882,6 +882,7 @@ int __init of_parse_thermal_zones(void)
> }
>
> for_each_child_of_node(np, child) {
> + const char *governor_name;
> struct thermal_zone_device *zone;
> struct thermal_zone_params *tzp;
> int i, mask = 0;
> @@ -909,6 +910,15 @@ int __init of_parse_thermal_zones(void)
> goto exit_free;
> }
>
> + /* Select a preferred governor if declared */
> + if (!of_property_read_string(child,
> + "thermal-governor-name",
> + &governor_name)) {
> + strncpy(tzp->governor_name,
> + governor_name,
> + sizeof(tzp->governor_name) - 1);
> + }
> +
> /* No hwmon because there might be hwmon drivers registering */
> tzp->no_hwmon = true;
>
> --
> 2.1.2
>
next prev parent reply other threads:[~2015-08-07 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 7:09 [PATCH] thermal: of: Introduce governor selection in dts Chung-Yih Wang (王崇懿)
2015-08-07 7:18 ` Krzysztof Kozlowski
[not found] ` <CAM2ehZYXsqCoS9ygXNfPHxt9-b5cFxH_ovrgjvM-BfDO6REcUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-07 10:31 ` Mark Rutland [this message]
2015-08-07 10:31 ` Mark Rutland
2015-08-10 8:00 ` Chung-Yih Wang (王崇懿)
2015-08-10 17:47 ` Javi Merino
2015-08-11 9:07 ` Sudeep Holla
[not found] ` <55C9BB53.1090001-5wv7dgnIgG8@public.gmane.org>
2015-11-02 21:24 ` Eduardo Valentin
2015-11-02 21:24 ` Eduardo Valentin
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=20150807103121.GC7646@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
--cc=cywang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.