linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Longnecker <mlongnecker@nvidia.com>
To: Wei Ni <wni@nvidia.com>, Rob Herring <robh@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	Thierry Reding <thierry.reding@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Mikko Perttunen <mikko.perttunen@kapsi.fi>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm
Date: Wed, 17 Feb 2016 12:52:32 -0800	[thread overview]
Message-ID: <56C4DD90.3080506@nvidia.com> (raw)
In-Reply-To: <56C4417D.2030409@nvidia.com>

(cc += linux-pm)

Rob,

The Linux thermal framework makes a sharp distinction between "thermal 
zones" and "cooling devices". thermal_zones are aware of temperatures 
and have trip points. cooling_devices are unaware of temperatures -- 
they just have a state variable. The thermal framework binds thermal 
zones at particular temperatures to particular cooling devices. It does 
so *in software*

The SOC_THERM IP block doesn't fit neatly in that paradigm. Yes, it 
provides the ability to read temperatures and raise interrupts at 
temperatures. However, it also has the ability to take cooling action 
_in hardware_ at particular temperatures. It can throttle the CPU & GPU 
clock and it can shut down the SOC. Neither of those are graceful 
actions, but they are valuable in practice.

In previous incarnations of this driver we have implemented an unholy 
mash-up of a cooling device and a thermal zone for configuring the 
hardware thermal actions. It was a mess. This patchset from Wei takes a 
simpler approach -- allow the thermal hardware cooling actions to be 
configured directly via DT. It's simple but it's good enough in 
practice. I like it.

-Matt

On 02/17/2016 01:46 AM, Wei Ni wrote:
> On 2016年02月15日 15:15, Wei Ni wrote:
>> >Hi, Rob
>> >
>> >On 2016年02月12日 22:42, Rob Herring wrote:
>>> >>On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni<wni@nvidia.com>  wrote:
>>>> >>>Add hw-trips sub-node for soctherm, which is
>>>> >>>used to describe the hardware trip points for
>>>> >>>each soctherm sensors.
>>> >>
>>> >>I still don't understand why you are doing something custom here.
>>> >>What's wrong with what is defined in:
>>> >>
>>> >>Documentation/devicetree/bindings/thermal/thermal.txt
> I think it's better to add a .set_trip_temp for of-thermal's
> thermal_zone_of_device_ops{}, so that we can set trip points on hardware. I'm
> preparing patches, and will send out next version.
> Thanks for your comments.
>

      reply	other threads:[~2016-02-17 20:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29  8:47 [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm Wei Ni
2016-02-12 14:42 ` Rob Herring
2016-02-15  7:15   ` Wei Ni
2016-02-15  7:19     ` Wei Ni
2016-02-17  9:46     ` Wei Ni
2016-02-17 20:52       ` Matt Longnecker [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=56C4DD90.3080506@nvidia.com \
    --to=mlongnecker@nvidia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mikko.perttunen@kapsi.fi \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=wni@nvidia.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).