Skip to content

Commit b02a728

Browse files
committed
dt-bindings: iio: Fix adi, ltc2983 uint64-matrix schema constraints
'minItems' and 'maxItems' apply at the same level as 'items' schemas as the keywords apply to arrays. What's currently defined is a 3 dimensional matrix with the outer size being undefined. To fix this, minItems/maxItems needs to be moved up a level. With this fixed, the example fails validation. For matrix types, the dts syntax must use brackets (<>) matching the schema definition. In this case, the inner array size is 2 elements, so let's add the correct bracketing. Fixes: 3986a14 ("dt-bindings: iio: Add ltc2983 documentation") Cc: "Nuno Sá" <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Hartmut Knaack <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Peter Meerwald-Stadler <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Acked-by: Nuno Sá <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent 8c02456 commit b02a728

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ patternProperties:
123123
sign.
124124
allOf:
125125
- $ref: /schemas/types.yaml#/definitions/uint64-matrix
126+
minItems: 3
127+
maxItems: 64
126128
items:
127-
minItems: 3
128-
maxItems: 64
129-
items:
130-
minItems: 2
131-
maxItems: 2
129+
minItems: 2
130+
maxItems: 2
132131

133132
"^diode@":
134133
type: object
@@ -328,12 +327,11 @@ patternProperties:
328327
78 and 79.
329328
allOf:
330329
- $ref: /schemas/types.yaml#/definitions/uint64-matrix
330+
minItems: 3
331+
maxItems: 64
331332
items:
332-
minItems: 3
333-
maxItems: 64
334-
items:
335-
minItems: 2
336-
maxItems: 2
333+
minItems: 2
334+
maxItems: 2
337335

338336
adi,custom-steinhart:
339337
description:
@@ -465,16 +463,16 @@ examples:
465463
adi,sensor-type = <9>; //custom thermocouple
466464
adi,single-ended;
467465
adi,custom-thermocouple = /bits/ 64
468-
<(-50220000) 0
469-
(-30200000) 99100000
470-
(-5300000) 135400000
471-
0 273150000
472-
40200000 361200000
473-
55300000 522100000
474-
88300000 720300000
475-
132200000 811200000
476-
188700000 922500000
477-
460400000 1000000000>; //10 pairs
466+
<(-50220000) 0>,
467+
<(-30200000) 99100000>,
468+
<(-5300000) 135400000>,
469+
<0 273150000>,
470+
<40200000 361200000>,
471+
<55300000 522100000>,
472+
<88300000 720300000>,
473+
<132200000 811200000>,
474+
<188700000 922500000>,
475+
<460400000 1000000000>; //10 pairs
478476
};
479477
480478
};

0 commit comments

Comments
 (0)