* [PATCH] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas
@ 2023-07-26 3:35 Rob Herring
2023-07-28 11:19 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-07-26 3:35 UTC (permalink / raw)
To: Lee Jones, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel
There's no need for 'additionalProperties' in the if/then schema as there's
already 'unevaluatedProperties' in the parent schema. With
'additionalProperties' dropped, 'compatible' and 'phandle' don't need
to be listed in the conditional schemas as 'compatible' is already in
the main section and 'phandle' will be implicitly added.
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../mfd/allwinner,sun6i-a31-prcm.yaml | 43 ++-----------------
.../mfd/allwinner,sun8i-a23-prcm.yaml | 42 ------------------
2 files changed, 3 insertions(+), 82 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml b/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml
index cf94176fe1eb..8789e3639ff7 100644
--- a/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml
+++ b/Documentation/devicetree/bindings/mfd/allwinner,sun6i-a31-prcm.yaml
@@ -34,6 +34,9 @@ patternProperties:
- allwinner,sun6i-a31-clock-reset
- fixed-factor-clock
+ required:
+ - compatible
+
allOf:
- if:
properties:
@@ -55,25 +58,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 2
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -85,25 +80,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -119,9 +106,6 @@ patternProperties:
offset of the bit controlling this particular gate in
the register.
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
@@ -129,16 +113,11 @@ patternProperties:
minItems: 1
maxItems: 32
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -150,9 +129,6 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 4
description: >
@@ -162,16 +138,11 @@ patternProperties:
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -183,16 +154,8 @@ patternProperties:
"#reset-cells":
const: 1
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
required:
- "#reset-cells"
- - compatible
-
- additionalProperties: false
required:
- compatible
diff --git a/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml b/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml
index 16c80a7eec49..e51f85519911 100644
--- a/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml
+++ b/Documentation/devicetree/bindings/mfd/allwinner,sun8i-a23-prcm.yaml
@@ -57,25 +57,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -91,9 +83,6 @@ patternProperties:
offset of the bit controlling this particular gate in
the register.
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
@@ -101,16 +90,11 @@ patternProperties:
minItems: 1
maxItems: 32
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -122,34 +106,8 @@ patternProperties:
"#reset-cells":
const: 1
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
required:
- "#reset-cells"
- - compatible
-
- additionalProperties: false
-
- - if:
- properties:
- compatible:
- contains:
- const: allwinner,sun8i-a23-codec-analog
-
- then:
- properties:
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
- required:
- - compatible
-
- additionalProperties: false
required:
- compatible
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas
2023-07-26 3:35 [PATCH] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas Rob Herring
@ 2023-07-28 11:19 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2023-07-28 11:19 UTC (permalink / raw)
To: Lee Jones, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Rob Herring
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel
On Tue, 25 Jul 2023 21:35:54 -0600, Rob Herring wrote:
> There's no need for 'additionalProperties' in the if/then schema as there's
> already 'unevaluatedProperties' in the parent schema. With
> 'additionalProperties' dropped, 'compatible' and 'phandle' don't need
> to be listed in the conditional schemas as 'compatible' is already in
> the main section and 'phandle' will be implicitly added.
>
>
> [...]
Applied, thanks!
[1/1] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas
commit: 67b8e8658577b117ea33b83c6c176ecd39caf1ca
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-28 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 3:35 [PATCH] dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas Rob Herring
2023-07-28 11:19 ` (subset) " Lee Jones
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).