linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Amit Kucheria <amit.kucheria@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] dt-bindings: thermal: Add yaml bindings for thermal zones
Date: Tue, 24 Mar 2020 09:06:07 -0600	[thread overview]
Message-ID: <CAL_JsqKhK-yz+iqe6G+-c0pt9mJSsW8hMnTiWdRh3_+1PeG=dg@mail.gmail.com> (raw)
In-Reply-To: <CAP245DWgg7KsV9sMXmS571dAAy-cvDy4Q_9vi_KGxoOQ5VBU7w@mail.gmail.com>

On Tue, Mar 24, 2020 at 4:33 AM Amit Kucheria <amit.kucheria@linaro.org> wrote:
>
> On Tue, Mar 24, 2020 at 2:46 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Mon, Mar 23, 2020 at 2:46 PM Amit Kucheria <amit.kucheria@linaro.org> wrote:
> > >
> > > Hi Rob,
> > >
> > > Thanks for the review.
> > >
> > > On Wed, Mar 11, 2020 at 8:19 PM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Thu, Mar 05, 2020 at 06:26:43PM +0530, Amit Kucheria wrote:
> > > > > As part of moving the thermal bindings to YAML, split it up into 3
> > > > > bindings: thermal sensors, cooling devices and thermal zones.
> > > > >
> > > > > The thermal-zone binding is a software abstraction to capture the
> > > > > properties of each zone - how often they should be checked, the
> > > > > temperature thresholds (trips) at which mitigation actions need to be
> > > > > taken and the level of mitigation needed at those thresholds.
> >
>
> [...]
>
> >
> > > > > +            /* ... */
> > > > > +
> > > > > +            gpu-thermal-top {
> > > >
> > > > This one is not going to match (which should cause an error).
> > >
> > > Good catch. Unfortunately, this isn't getting caught. Nor is the
> > > 12-char limitation before -thermal in the thermal zone name. I can't
> > > figure out why.
> >
> > That's because this schema has to be included by another schema which
> > matches on a parent node containing 'thermal-zones'. If
> > 'thermal-zones' can be at the root node, then you should rework this
> > such that you have $nodename: {const: thermal-zones} as a top-level
> > property.
>
> I've done all the change requested in the review(see attached patch),
> including moving to
>
> properties:
>    $nodename:
>        const: thermal-zones
>
> but that generates a bunch of errors similar to:
>
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/zte.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/psci.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/sunxi.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/sprd/sprd.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/calxeda.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/ti/ti,davinci.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/spear.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
> /home/amit/work/builds/build-aarch64/Documentation/devicetree/bindings/arm/ti/nspire.example.dt.yaml:
> /: $nodename:0: 'thermal-zones' was expected
>
> It seems like dtc is expecting every node to have a thermal-zones node?
>
> Looking at other root nodes such as cpus.yaml, the main difference I
> noticed was the absence of the "select: true" property. However, if I
> remove that, we go back to the schema not being applied.

'select: true' should be dropped. It will be applied to any
'thermal-zones' nodes. The generated 'select' will use $nodename if
compatible is not present for the schema.

I tested that putting an error in the example works.

> You mentioned that the thermal-zones schema needs to included by
> another schema. What did you mean by that?

Nevermind, I wasn't thinking that it's a top-level node. If it was a
child node, then you'd want to include it from the parent schemas.

Rob

      reply	other threads:[~2020-03-24 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 12:56 [PATCH v2 0/3] Convert thermal bindings to yaml Amit Kucheria
2020-03-05 12:56 ` [PATCH v2 1/3] dt-bindings: thermal: Add yaml bindings for thermal sensors Amit Kucheria
2020-03-11  8:26   ` Vincent Guittot
2020-03-05 12:56 ` [PATCH v2 2/3] dt-bindings: thermal: Add yaml bindings for thermal cooling-devices Amit Kucheria
2020-03-12 19:01   ` Rob Herring
2020-03-05 12:56 ` [PATCH v2 3/3] dt-bindings: thermal: Add yaml bindings for thermal zones Amit Kucheria
2020-03-11 14:49   ` Rob Herring
2020-03-23 20:46     ` Amit Kucheria
2020-03-23 21:16       ` Rob Herring
2020-03-24 10:33         ` Amit Kucheria
2020-03-24 15:06           ` Rob Herring [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='CAL_JsqKhK-yz+iqe6G+-c0pt9mJSsW8hMnTiWdRh3_+1PeG=dg@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=amit.kucheria@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=rui.zhang@intel.com \
    --cc=swboyd@chromium.org \
    /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).