Skip to content

Commit a6fa1f9

Browse files
committed
dt-bindings: Fix array property constraints
Schemas for array properties should only have 1 level of array constraints (e.g. items, maxItems, minItems). Sometimes the old encoding of all properties into a matrix leaked into the schema, and didn't matter for validation. Now the inner constraints are just silently ignored as json-schema array keywords are ignored on scalar values. Generally, keep the inner constraints and drop the outer "items". With gicv3 "mbi-alias" property, it is more appropriately a uint32 or uint64 as it is an address and size depends on "#address-cells". Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent b70ea87 commit a6fa1f9

File tree

7 files changed

+16
-24
lines changed

7 files changed

+16
-24
lines changed

Documentation/devicetree/bindings/cache/l2c2x0.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ properties:
100100
filter. Addresses in the filter window are directed to the M1 port. Other
101101
addresses will go to the M0 port.
102102
$ref: /schemas/types.yaml#/definitions/uint32-array
103-
items:
104-
minItems: 2
105-
maxItems: 2
103+
minItems: 2
104+
maxItems: 2
106105

107106
arm,io-coherent:
108107
description: indicates that the system is operating in an hardware

Documentation/devicetree/bindings/dma/dma-common.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ properties:
3232
The first item in the array is for channels 0-31, the second is for
3333
channels 32-63, etc.
3434
$ref: /schemas/types.yaml#/definitions/uint32-array
35-
items:
36-
minItems: 1
37-
# Should be enough
38-
maxItems: 255
35+
minItems: 1
36+
# Should be enough
37+
maxItems: 255
3938

4039
dma-channels:
4140
$ref: /schemas/types.yaml#/definitions/uint32

Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,9 @@ properties:
132132
Address property. Base address of an alias of the GICD region containing
133133
only the {SET,CLR}SPI registers to be used if isolation is required,
134134
and if supported by the HW.
135-
$ref: /schemas/types.yaml#/definitions/uint32-array
136-
items:
137-
minItems: 1
138-
maxItems: 2
135+
oneOf:
136+
- $ref: /schemas/types.yaml#/definitions/uint32
137+
- $ref: /schemas/types.yaml#/definitions/uint64
139138

140139
ppi-partitions:
141140
type: object
@@ -223,9 +222,8 @@ patternProperties:
223222
(u32, u32) tuple describing the untranslated
224223
address and size of the pre-ITS window.
225224
$ref: /schemas/types.yaml#/definitions/uint32-array
226-
items:
227-
minItems: 2
228-
maxItems: 2
225+
minItems: 2
226+
maxItems: 2
229227

230228
required:
231229
- compatible

Documentation/devicetree/bindings/media/i2c/thine,thp7312.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ properties:
135135

136136
data-lanes:
137137
$ref: /schemas/media/video-interfaces.yaml#/properties/data-lanes
138-
items:
139-
maxItems: 4
138+
maxItems: 4
140139
description:
141140
This property is for lane reordering between the THP7312 and the imaging
142141
sensor that it is connected to.

Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ patternProperties:
6666

6767
samsung,srom-timing:
6868
$ref: /schemas/types.yaml#/definitions/uint32-array
69-
items:
70-
minItems: 6
71-
maxItems: 6
69+
minItems: 6
70+
maxItems: 6
7271
description: |
7372
Array of 6 integers, specifying bank timings in the following order:
7473
Tacp, Tcah, Tcoh, Tacc, Tcos, Tacs.

Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ properties:
9292
may have two component regions -- base and extended -- so
9393
this information cannot be deduced from the dma-ranges.
9494
$ref: /schemas/types.yaml#/definitions/uint64-array
95-
items:
96-
minItems: 1
97-
maxItems: 3
95+
minItems: 1
96+
maxItems: 3
9897

9998
resets:
10099
minItems: 1

Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ properties:
5555

5656
qcom,smem:
5757
$ref: /schemas/types.yaml#/definitions/uint32-array
58-
items:
59-
maxItems: 2
58+
maxItems: 2
6059
description:
6160
Two identifiers of the inbound and outbound smem items used for this edge.
6261

0 commit comments

Comments
 (0)