Commit a6fa1f9e authored by Rob Herring (Arm)'s avatar Rob Herring (Arm)
Browse files

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240925232409.2208515-1-robh@kernel.org


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent b70ea878
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ properties:
      filter. Addresses in the filter window are directed to the M1 port. Other
      addresses will go to the M0 port.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
    minItems: 2
    maxItems: 2

+3 −4
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ properties:
      The first item in the array is for channels 0-31, the second is for
      channels 32-63, etc.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
    minItems: 1
    # Should be enough
    maxItems: 255
+5 −7
Original line number Diff line number Diff line
@@ -132,10 +132,9 @@ properties:
      Address property. Base address of an alias of the GICD region containing
      only the {SET,CLR}SPI registers to be used if isolation is required,
      and if supported by the HW.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
      minItems: 1
      maxItems: 2
    oneOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - $ref: /schemas/types.yaml#/definitions/uint64

  ppi-partitions:
    type: object
@@ -223,7 +222,6 @@ patternProperties:
          (u32, u32) tuple describing the untranslated
          address and size of the pre-ITS window.
        $ref: /schemas/types.yaml#/definitions/uint32-array
        items:
        minItems: 2
        maxItems: 2

+1 −2
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@ properties:

          data-lanes:
            $ref: /schemas/media/video-interfaces.yaml#/properties/data-lanes
            items:
            maxItems: 4
            description:
              This property is for lane reordering between the THP7312 and the imaging
+2 −3
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ patternProperties:

      samsung,srom-timing:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        items:
        minItems: 6
        maxItems: 6
        description: |
Loading