Commit 881e367a authored by Rob Herring's avatar Rob Herring Committed by Lee Jones
Browse files

dt-bindings: mfd: allwinner: prcm: Simplify conditional schemas



There's no need for 'additionalProperties' in the if/then schema as there's
already 'unevaluatedProperties' in the parent schema. With
'additionalProperties' dropped, 'compatible' and 'phandle' don't need
to be listed in the conditional schemas as 'compatible' is already in
the main section and 'phandle' will be implicitly added.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230726033554.174365-1-robh@kernel.org


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 789c9ce9
Loading
Loading
Loading
Loading
+3 −40
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ patternProperties:
          - allwinner,sun6i-a31-clock-reset
          - fixed-factor-clock

    required:
      - compatible

    allOf:
      - if:
          properties:
@@ -55,25 +58,17 @@ patternProperties:
            "#clock-cells":
              const: 0

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 2

            clock-output-names:
              maxItems: 1

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -85,25 +80,17 @@ patternProperties:
            "#clock-cells":
              const: 0

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 1

            clock-output-names:
              maxItems: 1

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -119,9 +106,6 @@ patternProperties:
                offset of the bit controlling this particular gate in
                the register.

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 1

@@ -129,16 +113,11 @@ patternProperties:
              minItems: 1
              maxItems: 32

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -150,9 +129,6 @@ patternProperties:
            "#clock-cells":
              const: 0

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 4
              description: >
@@ -162,16 +138,11 @@ patternProperties:
            clock-output-names:
              maxItems: 1

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -183,16 +154,8 @@ patternProperties:
            "#reset-cells":
              const: 1

            # Already checked in the main schema
            compatible: true

            phandle: true

          required:
            - "#reset-cells"
            - compatible

          additionalProperties: false

required:
  - compatible
+0 −42
Original line number Diff line number Diff line
@@ -57,25 +57,17 @@ patternProperties:
            "#clock-cells":
              const: 0

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 1

            clock-output-names:
              maxItems: 1

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -91,9 +83,6 @@ patternProperties:
                offset of the bit controlling this particular gate in
                the register.

            # Already checked in the main schema
            compatible: true

            clocks:
              maxItems: 1

@@ -101,16 +90,11 @@ patternProperties:
              minItems: 1
              maxItems: 32

            phandle: true

          required:
            - "#clock-cells"
            - compatible
            - clocks
            - clock-output-names

          additionalProperties: false

      - if:
          properties:
            compatible:
@@ -122,34 +106,8 @@ patternProperties:
            "#reset-cells":
              const: 1

            # Already checked in the main schema
            compatible: true

            phandle: true

          required:
            - "#reset-cells"
            - compatible

          additionalProperties: false

      - if:
          properties:
            compatible:
              contains:
                const: allwinner,sun8i-a23-codec-analog

        then:
          properties:
            # Already checked in the main schema
            compatible: true

            phandle: true

          required:
            - compatible

          additionalProperties: false

required:
  - compatible