dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas

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>
Link: https://lore.kernel.org/r/20230726033554.174365-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Rob Herring 2023-07-25 21:35:54 -06:00 committed by Lee Jones
parent 789c9ce9b4
commit 881e367adf
2 changed files with 3 additions and 82 deletions

View File

@ -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

View File

@ -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