devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Finley Xiao <finley.xiao@rock-chips.com>
Cc: heiko@sntech.de, rui.zhang@intel.com, daniel.lezcano@linaro.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	huangtao@rock-chips.com, tony.xie@rock-chips.com,
	cl@rock-chips.com
Subject: Re: [PATCH v1] thermal/of: Introduce k-po, k-pu and k-i for a thermal zone
Date: Mon, 24 Aug 2020 17:09:56 -0600	[thread overview]
Message-ID: <20200824230956.GA3500214@bogus> (raw)
In-Reply-To: <20200811123115.8144-1-finley.xiao@rock-chips.com>

On Tue, Aug 11, 2020 at 08:31:15PM +0800, Finley Xiao wrote:
> The default value for k_pu is:
>     2 * sustainable_power / (desired_temperature - switch_on_temp)
> The default value for k_po is:
>     sustainable_power / (desired_temperature - switch_on_temp)
> The default value for k_i is 10.
> 
> Even though these parameters of the PID controller can be changed
> by the following sysfs files:
>     /sys/class/thermal/thermal_zoneX/k_pu
>     /sys/class/thermal/thermal_zoneX/k_po
>     /sys/class/thermal/thermal_zoneX/k_i
> 
> But it's still more convenient to change the default values by devicetree,
> so introduce these three optional properties. If provided these properties,
> they will be parsed and associated with the thermal zone via the thermal
> zone parameters.
> 
> Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
> ---
>  Documentation/devicetree/bindings/thermal/thermal.txt | 14 ++++++++++++++

Bindings should be a separate file and this one is a DT schema now.

>  drivers/thermal/thermal_of.c                          |  7 +++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> index f78bec19ca35..ebe936b57ded 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -165,6 +165,20 @@ Optional property:
>  			2000mW, while on a 10'' tablet is around
>  			4500mW.
>  
> +- k-po:			Proportional parameter of the PID controller when
> +			current temperature is above the target.
> +  Type: signed
> +  Size: one cell
> +
> +- k-pu:			Proportional parameter of the PID controller when
> +			current temperature is below the target.
> +  Type: signed
> +  Size: one cell
> +
> +- k-i:			Integral parameter of the PID controller.
> +  Type: signed
> +  Size: one cell

What's PID?

I know nothing about the sysfs params, but the binding needs to stand on 
it's own and needs enough detail to educate me.

Rob

  reply	other threads:[~2020-08-24 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 12:31 [PATCH v1] thermal/of: Introduce k-po, k-pu and k-i for a thermal zone Finley Xiao
2020-08-24 23:09 ` Rob Herring [this message]
2020-08-25  8:25   ` Lukasz Luba
2020-08-25  9:44     ` Daniel Lezcano
2020-08-25 15:50       ` Rob Herring

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=20200824230956.GA3500214@bogus \
    --to=robh@kernel.org \
    --cc=cl@rock-chips.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=finley.xiao@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=rui.zhang@intel.com \
    --cc=tony.xie@rock-chips.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).