Linux Power Management development
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Michael Tatarinov <kukabu@gmail.com>, linux-pm@vger.kernel.org
Cc: Zhang Rui <rui.zhang@intel.com>, Eduardo Valentin <edubezval@gmail.com>
Subject: Re: [PATCH v2] of: thermal: Introduce "linux,hwmon" optional property
Date: Thu, 5 Oct 2017 14:04:55 +0200	[thread overview]
Message-ID: <5e4ecdc7-b6ca-d424-b192-ed3e8f449334@linaro.org> (raw)
In-Reply-To: <20171005084206.2914-1-kukabu@gmail.com>

On 05/10/2017 10:42, Michael Tatarinov wrote:
> Introduce an optional property called "linux,hwmon", which enable
> registration in hwmon subsystems.
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Eduardo Valentin <edubezval@gmail.com>
> Signed-off-by: Michael Tatarinov <kukabu@gmail.com>
> ---
>  Documentation/devicetree/bindings/thermal/thermal.txt | 6 ++++++
>  drivers/thermal/of-thermal.c                          | 7 +++++--
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> index 88b6ea1ad290..0dad55e77c7e 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -175,6 +175,10 @@ Optional property:
>  			2000mW, while on a 10'' tablet is around
>  			4500mW.
>  
> +- linux,hwmon:		Register the thermal zone in hwmon subsystems
> +  Type: boolean 	(requires CONFIG_THERMAL_HWMON).
> +  Size: one cell
> +
>  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
> @@ -556,6 +560,8 @@ thermal-zones {
>  
>  		sustainable-power = <2500>;
>  
> +		linux,hwmon;
> +
>  		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 d04ec3b9e5ff..037ef6bb9420 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -994,8 +994,11 @@ int __init of_parse_thermal_zones(void)
>  			goto exit_free;
>  		}
>  
> -		/* No hwmon because there might be hwmon drivers registering */
> -		tzp->no_hwmon = true;
> +		/**

Nit: this is kerneldoc comment format "/**"

> +		 * No hwmon by default because there might be hwmon drivers
> +		 * registering
> +		 */
> +		tzp->no_hwmon = !of_property_read_bool(child, "linux,hwmon");
>  
>  		if (!of_property_read_u32(child, "sustainable-power", &prop))
>  			tzp->sustainable_power = prop;
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2017-10-05 12:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05  8:42 [PATCH v2] of: thermal: Introduce "linux,hwmon" optional property Michael Tatarinov
2017-10-05 12:04 ` Daniel Lezcano [this message]
2017-10-05 14:57 ` Sudeep Holla
2017-10-06  2:44   ` Michael Tatarinov
2017-10-06  9:21     ` Sudeep Holla

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=5e4ecdc7-b6ca-d424-b192-ed3e8f449334@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=kukabu@gmail.com \
    --cc=linux-pm@vger.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