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

dt-bindings: Drop redundant 'maxItems/minItems' in if/then schemas



Another round of removing redundant minItems/maxItems when 'items' list is
specified. This time it is in if/then schemas as the meta-schema was
failing to check this case.

If a property has an 'items' list, then a 'minItems' or 'maxItems' with the
same size as the list is redundant and can be dropped. Note that is DT
schema specific behavior and not standard json-schema behavior. The tooling
will fixup the final schema adding any unspecified minItems/maxItems.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-By: default avatarVinod Koul <vkoul@kernel.org>
Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for IIO
Link: https://lore.kernel.org/r/20220503162738.3827041-1-robh@kernel.org
parent b2b701b3
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -55,8 +55,6 @@ allOf:
    then:
      properties:
        clocks:
          minItems: 7
          maxItems: 7
          items:
            - description: 32k osc
            - description: 25m osc
@@ -66,8 +64,6 @@ allOf:
            - description: ext3 clock input
            - description: ext4 clock input
        clock-names:
          minItems: 7
          maxItems: 7
          items:
            - const: ckil
            - const: osc_25m
+0 −4
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ then:
  properties:
    clocks:
      minItems: 1
      maxItems: 4
      items:
        - description: Functional clock
        - description: EXTAL input clock
@@ -104,7 +103,6 @@ then:

    clock-names:
      minItems: 1
      maxItems: 4
      items:
        - const: fck
        # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
@@ -128,12 +126,10 @@ then:
else:
  properties:
    clocks:
      maxItems: 1
      items:
        - description: Functional clock

    clock-names:
      maxItems: 1
      items:
        - const: fck

+0 −23
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ allOf:
      properties:
        clocks:
          minItems: 1
          maxItems: 3
          items:
            - description: Functional clock
            - description: DU_DOTCLKIN0 input clock
@@ -117,7 +116,6 @@ allOf:

        clock-names:
          minItems: 1
          maxItems: 3
          items:
            - const: du.0
            - pattern: '^dclkin\.[01]$'
@@ -159,7 +157,6 @@ allOf:
      properties:
        clocks:
          minItems: 2
          maxItems: 4
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -168,7 +165,6 @@ allOf:

        clock-names:
          minItems: 2
          maxItems: 4
          items:
            - const: du.0
            - const: du.1
@@ -216,7 +212,6 @@ allOf:
      properties:
        clocks:
          minItems: 2
          maxItems: 4
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -225,7 +220,6 @@ allOf:

        clock-names:
          minItems: 2
          maxItems: 4
          items:
            - const: du.0
            - const: du.1
@@ -271,7 +265,6 @@ allOf:
      properties:
        clocks:
          minItems: 2
          maxItems: 4
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -280,7 +273,6 @@ allOf:

        clock-names:
          minItems: 2
          maxItems: 4
          items:
            - const: du.0
            - const: du.1
@@ -327,7 +319,6 @@ allOf:
      properties:
        clocks:
          minItems: 2
          maxItems: 4
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -336,7 +327,6 @@ allOf:

        clock-names:
          minItems: 2
          maxItems: 4
          items:
            - const: du.0
            - const: du.1
@@ -386,7 +376,6 @@ allOf:
      properties:
        clocks:
          minItems: 3
          maxItems: 6
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -397,7 +386,6 @@ allOf:

        clock-names:
          minItems: 3
          maxItems: 6
          items:
            - const: du.0
            - const: du.1
@@ -448,7 +436,6 @@ allOf:
      properties:
        clocks:
          minItems: 4
          maxItems: 8
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -461,7 +448,6 @@ allOf:

        clock-names:
          minItems: 4
          maxItems: 8
          items:
            - const: du.0
            - const: du.1
@@ -525,7 +511,6 @@ allOf:
      properties:
        clocks:
          minItems: 3
          maxItems: 6
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -536,7 +521,6 @@ allOf:

        clock-names:
          minItems: 3
          maxItems: 6
          items:
            - const: du.0
            - const: du.1
@@ -596,7 +580,6 @@ allOf:
      properties:
        clocks:
          minItems: 3
          maxItems: 6
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -607,7 +590,6 @@ allOf:

        clock-names:
          minItems: 3
          maxItems: 6
          items:
            - const: du.0
            - const: du.1
@@ -666,14 +648,12 @@ allOf:
      properties:
        clocks:
          minItems: 1
          maxItems: 2
          items:
            - description: Functional clock for DU0
            - description: DU_DOTCLKIN0 input clock

        clock-names:
          minItems: 1
          maxItems: 2
          items:
            - const: du.0
            - const: dclkin.0
@@ -723,7 +703,6 @@ allOf:
      properties:
        clocks:
          minItems: 2
          maxItems: 4
          items:
            - description: Functional clock for DU0
            - description: Functional clock for DU1
@@ -732,7 +711,6 @@ allOf:

        clock-names:
          minItems: 2
          maxItems: 4
          items:
            - const: du.0
            - const: du.1
@@ -791,7 +769,6 @@ allOf:
            - description: Functional clock

        clock-names:
          maxItems: 1
          items:
            - const: du.0

+0 −2
Original line number Diff line number Diff line
@@ -138,7 +138,6 @@ allOf:
            - const: bus
            - const: adc
          minItems: 1
          maxItems: 2

        interrupts:
          items:
@@ -170,7 +169,6 @@ allOf:
            - const: bus
            - const: adc
          minItems: 1
          maxItems: 2

        interrupts:
          items:
+1 −6
Original line number Diff line number Diff line
@@ -202,22 +202,17 @@ allOf:
        clocks:
          items:
            - description: module clock
          minItems: 1
          maxItems: 1
    else:
      properties:
        clocks:
          items:
            - description: module clock
            - description: timeout clock
          minItems: 2
          maxItems: 2

        clock-names:
          items:
            - const: sdhci
            - const: tmclk
          minItems: 2
          maxItems: 2
      required:
        - clock-names

Loading