Commit b02a728f authored by Rob Herring's avatar Rob Herring
Browse files

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: 3986a148 ("dt-bindings: iio: Add ltc2983 documentation")
Cc: "Nuno Sá" <nuno.sa@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarNuno Sá <nuno.sa@analog.com>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 8c024560
Loading
Loading
Loading
Loading
+18 −20
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ patternProperties:
          sign.
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint64-matrix
        items:
        minItems: 3
        maxItems: 64
        items:
@@ -328,7 +327,6 @@ patternProperties:
          78 and 79.
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint64-matrix
        items:
        minItems: 3
        maxItems: 64
        items:
@@ -465,16 +463,16 @@ examples:
                        adi,sensor-type = <9>; //custom thermocouple
                        adi,single-ended;
                        adi,custom-thermocouple = /bits/ 64
                                 <(-50220000) 0
                                  (-30200000) 99100000
                                  (-5300000) 135400000
                                  0 273150000
                                  40200000 361200000
                                  55300000 522100000
                                  88300000 720300000
                                  132200000 811200000
                                  188700000 922500000
                                  460400000 1000000000>; //10 pairs
                                 <(-50220000) 0>,
                                 <(-30200000) 99100000>,
                                 <(-5300000) 135400000>,
                                 <0 273150000>,
                                 <40200000 361200000>,
                                 <55300000 522100000>,
                                 <88300000 720300000>,
                                 <132200000 811200000>,
                                 <188700000 922500000>,
                                 <460400000 1000000000>; //10 pairs
               };

        };