devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pawel Moll <pawel.moll@arm.com>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Mark Rutland <Mark.Rutland@arm.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Durgadoss R <durgadoss.r@intel.com>,
	"Zhang, Rui" <rui.zhang@intel.com>, Wei Ni <wni@nvidia.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: RFC: device thermal limits represented in device tree nodes
Date: Thu, 25 Jul 2013 17:15:28 +0100	[thread overview]
Message-ID: <1374768928.3213.31.camel@hornet> (raw)
In-Reply-To: <51EFED19.5090900@ti.com>

On Wed, 2013-07-24 at 16:04 +0100, Eduardo Valentin wrote:
> > 1. As you have pointed out, the thermal limits are related to the
> > *device being monitored*, not the sensor itself.
> > 
> Yeah, thinking of it now, this original proposal, it lacks a stronger
> relationship mapping between monitored and monitoring devices. But it
> does have it..
> 
> > 2. Therefore the tree should express relation between those two; a
> > sensor mode should be connected (via phandle most likely) to the device
> 
> .. this is done, more or less, by means of the 'type' property (see
> original RFC binding).

I'm not sure what do you mean (regarding "type"), but I think I got what
I wanted with the "monitoring_device" phandles (shouldn't it be
"_device*s*" then? ;-).

> For example:
> cpu0: cpu@0 {
> 	/* ... cpu needed bindings  */
> 
> 	thermal_zone {
> 		type = "CPU";

So what does this exactly mean? What is so special about CPU? What other
types you've got there? (Am I just lazy not looking at the numerous
links you provided? ;-)

> 		monitoring_device = <&sensor@xxxx
> 				    &sensor@yyyy>;
> 
> 		mask = <0x03>; /* trips writability */
> 		passive_delay = <250>; /* milliseconds */
> 		polling_delay = <1000>; /* milliseconds */
> 		policy = "step_wise";

The word "policy" doesn't sound to me like a "hardware feature",
wouldn't you agree?

> 		trips {
> 			alert@100000{
> 				temperature = <100000>; /* milliCelsius
> 				hysteresis = <2000>; /* milliCelsius */
> 				type = <THERMAL_TRIP_PASSIVE>;
> 			};
> 			crit@125000{
> 				temperature = <125000>; /* milliCelsius
> 				hysteresis = <2000>; /* milliCelsius */
> 				type = <THERMAL_TRIP_CRITICAL>;
> 			};
> 		};
> 		bind_params {
> 			action@0{
> 				cooling_device = "thermal-cpufreq";

Why is it a string? It seems very Linux-y... (cpufreq) Is there any
particular reason not to have phandles to the fans that have any impact
on the zone?

> 				weight = <100>; /* percentage */

Does this mean: how "successful" will be the particular fan?

> Another way, as I mentioned in the original RFC, an option would be to
> have the thermal_zone node not embedded in any device node. But them, we
> would need to firmly link it to other device nodes, to describe what is
> monitored and what is used for monitoring. 

You mean the zone nodes would live at the top level of the tree? To my
mind the root represents the device (the board, whatever you call it),
which, I guess, may be what you want, if the zone "covers" the whole
device? (as in: one fan and one sensor somewhere in the box and the only
thing you may do is to check the ambient temperature and start the fan
if it's to high)

> With the above I believe we could have dts(i) files describing only
> thermal, for instance.

You can include a dtsi inside the device node, no problem with that:

/dts-v1/;
        
/ {     
        smb {                   
                compatible = "simple-bus";

                /include/ "vexpress-v2m-rs1.dtsi"
        };      
};     

Pawel



  reply	other threads:[~2013-07-25 16:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 14:25 RFC: device thermal limits represented in device tree nodes Eduardo Valentin
2013-07-24  1:44 ` Stephen Warren
2013-07-24 10:45   ` Mark Rutland
2013-07-24 13:29     ` Eduardo Valentin
2013-07-24 11:19   ` Pawel Moll
2013-07-24 15:04     ` Eduardo Valentin
2013-07-25 16:15       ` Pawel Moll [this message]
2013-07-25 16:38         ` Pawel Moll
2013-07-25 17:21           ` Eduardo Valentin
2013-07-25 17:20         ` Eduardo Valentin
2013-07-25 17:33           ` Pawel Moll
2013-07-26 19:55             ` Eduardo Valentin
2013-08-06 11:14               ` Pawel Moll
2013-08-07 20:18                 ` Eduardo Valentin
2013-08-08  8:53                   ` Mark Rutland
2013-08-08 13:45                     ` Pawel Moll
2013-07-24 13:24   ` Eduardo Valentin
  -- strict thread matches above, loose matches on Subject: below --
2013-07-22 14:19 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=1374768928.3213.31.camel@hornet \
    --to=pawel.moll@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=durgadoss.r@intel.com \
    --cc=eduardo.valentin@ti.com \
    --cc=grant.likely@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rob.herring@calxeda.com \
    --cc=rui.zhang@intel.com \
    --cc=swarren@wwwdotorg.org \
    --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).