dt-bindings: pinctrl: nvidia,tegra234-pinmux: Restructure common schema
Subsystems (4)
Rob Herring
maintainerPATCH 1/1 dt-bindings: pinctrl: nvidia,tegra234-pinmux: Restructure common schema
The structure of the NVIDIA Tegra234 common pinmux schema doesn't work for restricting properties because a child node schema can't be extended with additional properties from another schema defining the same child node. The 2 child node schemas are evaluated independently as the schemas are not recursively combined in any way.
As the common schema is almost all the child node schema anyways, just remove the parent node from the common schema. Then add 'reg' and adjust the $ref's in the users of the common schema.
--- .../pinctrl/nvidia,tegra234-pinmux-aon.yaml | 7 +- .../nvidia,tegra234-pinmux-common.yaml | 84 ++++++++----------- .../pinctrl/nvidia,tegra234-pinmux.yaml | 7 +- 3 files changed, 45 insertions(+), 53 deletions(-)
Documentation/devicetree/bindings/pinctrl/nvidia,tegra234-pinmux-aon.yaml +5 -2
@@ -10,18 +10,21 @@ maintainers: - Thierry Reding <[email protected]> - Jon Hunter <[email protected]> -$ref: nvidia,tegra234-pinmux-common.yaml - properties: compatible: const: nvidia,tegra234-pinmux-aon + reg: + maxItems: 1 + patternProperties: "^pinmux(-[a-z0-9-]+)?$": type: object # pin groups additionalProperties: + $ref: nvidia,tegra234-pinmux-common.yaml + properties: nvidia,pins: items:
Documentation/devicetree/bindings/pinctrl/nvidia,tegra234-pinmux-common.yaml +35 -49
92 lines not on this page · raw message
Documentation/devicetree/bindings/pinctrl/nvidia,tegra234-pinmux.yaml +5 -2
@@ -10,18 +10,21 @@ maintainers: - Thierry Reding <[email protected]> - Jon Hunter <[email protected]> -$ref: nvidia,tegra234-pinmux-common.yaml - properties: compatible: const: nvidia,tegra234-pinmux + reg: + maxItems: 1 + patternProperties: "^pinmux(-[a-z0-9-]+)?$": type: object # pin groups additionalProperties: + $ref: nvidia,tegra234-pinmux-common.yaml + properties: nvidia,pins: items:
Signature · 1 line
2.43.0
Quoted 11 lines · Rob Herring
The structure of the NVIDIA Tegra234 common pinmux schema doesn't work for restricting properties because a child node schema can't be extended with additional properties from another schema defining the same child node. The 2 child node schemas are evaluated independently as the schemas are not recursively combined in any way.
As the common schema is almost all the child node schema anyways, just remove the parent node from the common schema. Then add 'reg' and adjust the $ref's in the users of the common schema.
Signed-off-by Rob Herring <[email protected]>
Patch applied!
Yours,
Linus Walleij