* [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
@ 2023-08-19 1:09 Rob Herring
2023-08-19 10:02 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rob Herring @ 2023-08-19 1:09 UTC (permalink / raw)
To: Geert Uytterhoeven, Linus Walleij, Krzysztof Kozlowski,
Conor Dooley, Magnus Damm, Chris Brandt
Cc: linux-renesas-soc, linux-gpio, devicetree, linux-kernel
A schema under 'additionalProperties' works better for matching any
property/node other than the ones explicitly listed. Convert the schema
to use that rather than the wildcard and if/then schema.
Drop 'phandle' properties which never need to be explicitly listed while
we're here.
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../pinctrl/renesas,rza2-pinctrl.yaml | 61 +++++++++----------
1 file changed, 28 insertions(+), 33 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml
index 37173a64fed2..8271e7b2c162 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml
@@ -37,40 +37,37 @@ properties:
gpio-ranges:
maxItems: 1
-patternProperties:
- "^.*$":
- if:
- type: object
- then:
- allOf:
- - $ref: pincfg-node.yaml#
- - $ref: pinmux-node.yaml#
+additionalProperties:
+ type: object
+
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ description:
+ The child nodes of the pin controller designate pins to be used for
+ specific peripheral functions or as GPIO.
+
+ A pin multiplexing sub-node describes how to configure a set of
+ (or a single) pin in some desired alternate function mode.
+ The values for the pinmux properties are a combination of port name,
+ pin number and the desired function index. Use the RZA2_PINMUX macro
+ located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
+ define these.
+ For assigning GPIO pins, use the macro RZA2_PIN also in
+ to express the desired port pin.
+
+ properties:
+ pinmux:
description:
- The child nodes of the pin controller designate pins to be used for
- specific peripheral functions or as GPIO.
+ Values are constructed from GPIO port number, pin number, and
+ alternate function configuration number using the RZA2_PINMUX()
+ helper macro in r7s9210-pinctrl.h.
- A pin multiplexing sub-node describes how to configure a set of
- (or a single) pin in some desired alternate function mode.
- The values for the pinmux properties are a combination of port name,
- pin number and the desired function index. Use the RZA2_PINMUX macro
- located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
- define these.
- For assigning GPIO pins, use the macro RZA2_PIN also in
- to express the desired port pin.
+ required:
+ - pinmux
- properties:
- phandle: true
-
- pinmux:
- description:
- Values are constructed from GPIO port number, pin number, and
- alternate function configuration number using the RZA2_PINMUX()
- helper macro in r7s9210-pinctrl.h.
-
- required:
- - pinmux
-
- additionalProperties: false
+ additionalProperties: false
allOf:
- $ref: pinctrl.yaml#
@@ -82,8 +79,6 @@ required:
- '#gpio-cells'
- gpio-ranges
-additionalProperties: false
-
examples:
- |
#include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
2023-08-19 1:09 [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes Rob Herring
@ 2023-08-19 10:02 ` Krzysztof Kozlowski
2023-08-21 10:33 ` Linus Walleij
2023-08-23 8:24 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-19 10:02 UTC (permalink / raw)
To: Rob Herring, Geert Uytterhoeven, Linus Walleij,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Chris Brandt
Cc: linux-renesas-soc, linux-gpio, devicetree, linux-kernel
On 19/08/2023 03:09, Rob Herring wrote:
> A schema under 'additionalProperties' works better for matching any
> property/node other than the ones explicitly listed. Convert the schema
> to use that rather than the wildcard and if/then schema.
>
> Drop 'phandle' properties which never need to be explicitly listed while
> we're here.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
2023-08-19 1:09 [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes Rob Herring
2023-08-19 10:02 ` Krzysztof Kozlowski
@ 2023-08-21 10:33 ` Linus Walleij
2023-08-21 12:00 ` Geert Uytterhoeven
2023-08-23 8:24 ` Linus Walleij
2 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2023-08-21 10:33 UTC (permalink / raw)
To: Rob Herring
Cc: Geert Uytterhoeven, Krzysztof Kozlowski, Conor Dooley,
Magnus Damm, Chris Brandt, linux-renesas-soc, linux-gpio,
devicetree, linux-kernel
On Sat, Aug 19, 2023 at 3:09 AM Rob Herring <robh@kernel.org> wrote:
> A schema under 'additionalProperties' works better for matching any
> property/node other than the ones explicitly listed. Convert the schema
> to use that rather than the wildcard and if/then schema.
>
> Drop 'phandle' properties which never need to be explicitly listed while
> we're here.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
Looks good to me, but Geert usually handles Renesas stuff so not
applying unless I get asked explicitly to do so.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
2023-08-21 10:33 ` Linus Walleij
@ 2023-08-21 12:00 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-08-21 12:00 UTC (permalink / raw)
To: Linus Walleij
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Magnus Damm,
Chris Brandt, linux-renesas-soc, linux-gpio, devicetree,
linux-kernel
Hi Linus,
On Mon, Aug 21, 2023 at 12:34 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Sat, Aug 19, 2023 at 3:09 AM Rob Herring <robh@kernel.org> wrote:
> > A schema under 'additionalProperties' works better for matching any
> > property/node other than the ones explicitly listed. Convert the schema
> > to use that rather than the wildcard and if/then schema.
> >
> > Drop 'phandle' properties which never need to be explicitly listed while
> > we're here.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Looks good to me, but Geert usually handles Renesas stuff so not
> applying unless I get asked explicitly to do so.
Unless some new bugs show up (hold wood etc.), I do not plan to
send more pin control PRs for v6.5 or v6.6, so please take it.
Thanks!
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
2023-08-19 1:09 [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes Rob Herring
2023-08-19 10:02 ` Krzysztof Kozlowski
2023-08-21 10:33 ` Linus Walleij
@ 2023-08-23 8:24 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2023-08-23 8:24 UTC (permalink / raw)
To: Rob Herring
Cc: Geert Uytterhoeven, Krzysztof Kozlowski, Conor Dooley,
Magnus Damm, Chris Brandt, linux-renesas-soc, linux-gpio,
devicetree, linux-kernel
On Sat, Aug 19, 2023 at 3:09 AM Rob Herring <robh@kernel.org> wrote:
> A schema under 'additionalProperties' works better for matching any
> property/node other than the ones explicitly listed. Convert the schema
> to use that rather than the wildcard and if/then schema.
>
> Drop 'phandle' properties which never need to be explicitly listed while
> we're here.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
Patch applied to the pinctrl tree.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-23 10:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-19 1:09 [PATCH] dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes Rob Herring
2023-08-19 10:02 ` Krzysztof Kozlowski
2023-08-21 10:33 ` Linus Walleij
2023-08-21 12:00 ` Geert Uytterhoeven
2023-08-23 8:24 ` Linus Walleij
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).