Re: [PATCH RFC] dt-bindings: pinctrl: sh-pfc: Convert to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

On Thu, Apr 30, 2020 at 4:32 AM Rob Herring <robh@xxxxxxxxxx> 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@xxxxxxxxx>
> > ---
> > 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@xxxxxxxxxxxxxx

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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux