Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277695

Re: [PATCH v3 2/4] devicetree: bindings: let thermal-sensor point to other thermal zones

From Javi Merino <javi.merino@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/4] devicetree: bindings: let thermal-sensor point to other thermal zones
Date 2015-11-25 19:50 +0100
Message-ID <qyNiF-1z2-13@gated-at.bofh.it> (permalink)
References <qyK1r-7ZU-9@gated-at.bofh.it> <qyK1s-7ZU-31@gated-at.bofh.it> <qyMwj-12v-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 25, 2015 at 05:54:41PM +0000, Mark Rutland wrote:
> On Wed, Nov 25, 2015 at 03:09:44PM +0000, Javi Merino wrote:
> > The thermal-sensor property of the thermal zone node accepts phandles to
> > thermal sensors.  However, thermal zones can be created as an
> > aggregation of other thermal zones.  Extend the thermal-sensors property
> > to allow phandles to other thermal zones.  This patch also adds an
> > example that showcases how a board thermal zone can be created from the
> > aggregation of the cpu, gpu and lcd thermal zones.
> > 
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: Eduardo Valentin <edubezval@gmail.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Pawel Moll <pawel.moll@arm.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> > Cc: Kumar Gala <galak@codeaurora.org>
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Javi Merino <javi.merino@arm.com>
> > ---
> > 
> > Notes:
> >     Hi devicetree,
> >     
> >     Is it ok to extend the definition of the thermal-sensors property like
> >     this?  IOW are phandles strongly typed?
> 
> I think it's OK so long as each thermal zone has #thermal-sensor-cells
> set explicitly, if used as a sensor, and we can agree on the semantics
> of what it means for a thermal zone to be a sensor.
> 
> I don't really follow why you need the zone to be a sensor, and can't
> simply refer to the sensor from two zones. Are you trying to imply an
> ordering of trip points (e.g. that the sub-zones' trips should be taken
> into account first)?

No, it doesn't affect the ordering of trip points.

This came out of a discussion at LPC.  Currently thermal zones can
only have on thermal sensor associated with them.  After some
discussion, Mike Turquette suggested that we could use an approach
similar to what it's done with power domains and stack them.

> >  .../devicetree/bindings/thermal/thermal.txt        | 154 ++++++++++++++++++++-
> >  1 file changed, 151 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> > index 41b817f7b670..52b7e9ae3b4d 100644
> > --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> > +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> > @@ -145,9 +145,12 @@ Required properties:
> >    Size: one cell
> >  
> >  - thermal-sensors:	A list of thermal sensor phandles and sensor specifier
> > -  Type: list of 	used while monitoring the thermal zone.
> > -  phandles + sensor
> > -  specifier
> > +  Type: list of 	used while monitoring the thermal zone. The phandles
> > +  phandles + sensor	can point to thermal sensors or other thermal zone
> > +  specifier		nodes. If it points to other thermal zone
> > +			nodes you should omit the sensor specifier
> > +			and set #thermal-sensor-cells to 0 for the
> > +			thermal zone.
> 
> The example misses #thermal-sensor-cells = <0> for each of the zones.

You're right, I'll fix it for the next version

> Can a zone normal have multiple sensors? If so, what is the aggregate
> value if a zone is used as a sensor? Max? Min? Scaled by contribution
> somehow?

No, currently a thermal zone can only specify one sensor in its
thermal-sensors property

Cheers,
Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] Hierarchical thermal zones Javi Merino <javi.merino@arm.com> - 2015-11-25 16:20 +0100
  [PATCH v3 2/4] devicetree: bindings: let thermal-sensor point to other thermal zones Javi Merino <javi.merino@arm.com> - 2015-11-25 16:20 +0100
    Re: [PATCH v3 2/4] devicetree: bindings: let thermal-sensor point to  other thermal zones Mark Rutland <mark.rutland@arm.com> - 2015-11-25 19:00 +0100
      Re: [PATCH v3 2/4] devicetree: bindings: let thermal-sensor point to  other thermal zones Javi Merino <javi.merino@arm.com> - 2015-11-25 19:50 +0100

csiph-web