linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Herring <robh@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH RFC] dt-bindings: pinctrl: sh-pfc: Convert to json-schema
Date: Fri, 7 Aug 2020 15:36:59 +0200	[thread overview]
Message-ID: <CAMuHMdWSPDQBABXZVaPecETbSRsP2yyZXLHiL_+_R2n_-09jRg@mail.gmail.com> (raw)
In-Reply-To: <20200430023237.GA23316@bogus>

Hi Rob,

On Thu, Apr 30, 2020 at 4:32 AM Rob Herring <robh@kernel.org> wrote:
> On Fri, Apr 17, 2020 at 04:09:20PM +0200, Geert Uytterhoeven wrote:
> > Convert the Renesas Pin Function Controller (PFC) Device Tree binding
> > documentation to json-schema.
> >
> > Document missing properties.
> > Drop deprecated and obsolete #gpio-range-cells property.
> > Update the example to match reality.
> > Drop consumer examples, as they do not belong here.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > How to describe that pin configuration nodes can have subnodes?
> > E.g.
> >
> >     arch/arm/boot/dts/sh73a0-kzm9g.dt.yaml: pin-controller@e6050000: mmc: Additional properties are not allowed ('cfg', 'mux' were unexpected)
>
> I shouldn't tell you so no one does this again...

Note that this is fairly common, as a device may need to configure
multiple groups or pins, or pinmux and GPIO pins.  Hence the grouping
under a container node.

Cfr. Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml

> I think you want something like this assuming you have either
> grandchildren or properties, but not both in the child nodes:
>
> patternProperties:
>   ".*":

[...]

I couldn't get it to work with "patternProperties", but using
"additionalProperties" like ingenic,pinctrl.yaml does work for me.

> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml

> > +  interrupts-extended:
>
> Just do 'interrupts'. It's fixed up in the tooling.

Apparently not everywhere...

> > +if:
> > +  properties:
> > +    compatible:
> > +      items:
> > +        enum:
> > +          - renesas,pfc-r8a73a4
> > +          - renesas,pfc-r8a7740
> > +          - renesas,pfc-sh73a0
> > +then:
> > +  required:
> > +    - interrupts-extended

I have to keep it here, or I get:

    Documentation/devicetree/bindings/pinctrl/renesas,pfc.example.dt.yaml:
pin-controller@e6050000: 'interrupts' is a required property

So I'll keep it in both places, for consistency.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      parent reply	other threads:[~2020-08-07 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 14:09 [PATCH RFC] dt-bindings: pinctrl: sh-pfc: Convert to json-schema Geert Uytterhoeven
2020-04-27 13:56 ` Geert Uytterhoeven
2020-04-30  2:32 ` Rob Herring
2020-05-14 20:00   ` Geert Uytterhoeven
2020-08-07 13:36   ` Geert Uytterhoeven [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=CAMuHMdWSPDQBABXZVaPecETbSRsP2yyZXLHiL_+_R2n_-09jRg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=robh@kernel.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).