From: Zhang Rui <rui.zhang@intel.com>
To: Javi Merino <javi.merino@arm.com>
Cc: linux-pm@vger.kernel.org, sudeep.holla@arm.com,
punit.agrawal@arm.com, Eduardo Valentin <eduardo.valentin@ti.com>
Subject: Re: [PATCH] thermal: of: use the default governor when registering thermal zones from DT
Date: Thu, 27 Feb 2014 14:43:06 +0800 [thread overview]
Message-ID: <1393483386.2637.9.camel@rzhang1-mobl4> (raw)
In-Reply-To: <1393263953-4590-1-git-send-email-javi.merino@arm.com>
Hi,
On Mon, 2014-02-24 at 17:45 +0000, Javi Merino wrote:
> Thermal zones specified in the DT get no governor because the
> thermal_zone_parameters they pass to thermal_zone_device_register()
> has an empty governor_name entry. As there is no way to set the
> governor from the DT at the moment, make them register the default
> governor.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Eduardo Valentin <eduardo.valentin@ti.com>
> Signed-off-by: Javi Merino <javi.merino@arm.com>
> ---
>
> Another alternative would be to set governor_name to the default in
> thermal_zone_device_register() if it receives the empty string.
>
agreed.
please check if the patch at https://patchwork.kernel.org/patch/3730391/
fixes the problem for you or not.
thanks,
rui
> There are no other users of thermal_zone_parameters in the kernel and
> there is no user of the governor_name. I was tempted to kill
> governor_name, but I guess it's there to be used by external modules.
>
> drivers/thermal/of-thermal.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index 04b1be7..3f850f2 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -791,6 +791,13 @@ int __init of_parse_thermal_zones(void)
> /* No hwmon because there might be hwmon drivers registering */
> tzp->no_hwmon = true;
>
> + /*
> + * We can't specify the governor in the DT, so use the
> + * default one
> + */
> + strncpy(tzp->governor_name, DEFAULT_THERMAL_GOVERNOR,
> + ARRAY_SIZE(tzp->governor_name));
> +
> zone = thermal_zone_device_register(child->name, tz->ntrips,
> 0, tz,
> ops, tzp,
prev parent reply other threads:[~2014-02-27 6:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 17:45 [PATCH] thermal: of: use the default governor when registering thermal zones from DT Javi Merino
2014-02-27 6:43 ` Zhang Rui [this message]
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=1393483386.2637.9.camel@rzhang1-mobl4 \
--to=rui.zhang@intel.com \
--cc=eduardo.valentin@ti.com \
--cc=javi.merino@arm.com \
--cc=linux-pm@vger.kernel.org \
--cc=punit.agrawal@arm.com \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).