Skip to content

Commit 25990aa

Browse files
robherringlinusw
authored andcommitted
dt-bindings: pinctrl: renesas,rza2: Use 'additionalProperties' for child nodes
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> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230819010928.916438-1-robh@kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 0d8387f commit 25990aa

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,37 @@ properties:
3737
gpio-ranges:
3838
maxItems: 1
3939

40-
patternProperties:
41-
"^.*$":
42-
if:
43-
type: object
44-
then:
45-
allOf:
46-
- $ref: pincfg-node.yaml#
47-
- $ref: pinmux-node.yaml#
40+
additionalProperties:
41+
type: object
42+
43+
allOf:
44+
- $ref: pincfg-node.yaml#
45+
- $ref: pinmux-node.yaml#
46+
47+
description:
48+
The child nodes of the pin controller designate pins to be used for
49+
specific peripheral functions or as GPIO.
50+
51+
A pin multiplexing sub-node describes how to configure a set of
52+
(or a single) pin in some desired alternate function mode.
53+
The values for the pinmux properties are a combination of port name,
54+
pin number and the desired function index. Use the RZA2_PINMUX macro
55+
located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
56+
define these.
57+
For assigning GPIO pins, use the macro RZA2_PIN also in
58+
to express the desired port pin.
59+
60+
properties:
61+
pinmux:
4862
description:
49-
The child nodes of the pin controller designate pins to be used for
50-
specific peripheral functions or as GPIO.
63+
Values are constructed from GPIO port number, pin number, and
64+
alternate function configuration number using the RZA2_PINMUX()
65+
helper macro in r7s9210-pinctrl.h.
5166

52-
A pin multiplexing sub-node describes how to configure a set of
53-
(or a single) pin in some desired alternate function mode.
54-
The values for the pinmux properties are a combination of port name,
55-
pin number and the desired function index. Use the RZA2_PINMUX macro
56-
located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
57-
define these.
58-
For assigning GPIO pins, use the macro RZA2_PIN also in
59-
to express the desired port pin.
67+
required:
68+
- pinmux
6069

61-
properties:
62-
phandle: true
63-
64-
pinmux:
65-
description:
66-
Values are constructed from GPIO port number, pin number, and
67-
alternate function configuration number using the RZA2_PINMUX()
68-
helper macro in r7s9210-pinctrl.h.
69-
70-
required:
71-
- pinmux
72-
73-
additionalProperties: false
70+
additionalProperties: false
7471

7572
allOf:
7673
- $ref: pinctrl.yaml#
@@ -82,8 +79,6 @@ required:
8279
- '#gpio-cells'
8380
- gpio-ranges
8481

85-
additionalProperties: false
86-
8782
examples:
8883
- |
8984
#include <dt-bindings/pinctrl/r7s9210-pinctrl.h>

0 commit comments

Comments
 (0)