Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas
From: Geert Uytterhoeven
Date: Wed Feb 03 2021 - 03:02:40 EST
Hi Rob,
On Tue, Feb 2, 2021 at 9:55 PM Rob Herring <robh@xxxxxxxxxx> wrote:
> Properties in if/then schemas weren't getting checked by the meta-schemas.
> Enabling meta-schema checks finds several errors.
>
> The use of an 'items' schema (as opposed to the list form) is wrong in
> some cases as it applies to all entries. 'contains' is the correct schema
> to use in the case of multiple entries.
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
Thanks for your patch!
> --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> @@ -81,9 +81,8 @@ properties:
> if:
> properties:
> compatible:
> - items:
> - enum:
> - - renesas,usb2-phy-r7s9210
> + contains:
> + const: renesas,usb2-phy-r7s9210
Single entry, so "contains" not needed?
> --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml
> @@ -76,11 +76,10 @@ required:
> if:
> properties:
> compatible:
> - items:
> - enum:
> - - renesas,pfc-r8a73a4
> - - renesas,pfc-r8a7740
> - - renesas,pfc-sh73a0
> + enum:
> + - renesas,pfc-r8a73a4
> + - renesas,pfc-r8a7740
> + - renesas,pfc-sh73a0
Missing "contains"?
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