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

dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas



Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present.

Add unevaluatedProperties or additionalProperties as appropriate, and
then add any missing properties flagged by the addition.

Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarLee Jones <lee@kernel.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124230228.372305-1-robh@kernel.org


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 5eac0bdc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ patternProperties:
      it is stricter and always has two compatibles.
    type: object
    $ref: '/schemas/simple-bus.yaml'
    unevaluatedProperties: false

    properties:
      compatible:
+3 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ properties:

  clocks:
    type: object
    additionalProperties: false

    properties:
      compatible:
@@ -47,6 +48,7 @@ properties:

  reset:
    type: object
    additionalProperties: false

    properties:
      compatible:
@@ -63,6 +65,7 @@ properties:

  pwm:
    type: object
    additionalProperties: false

    properties:
      compatible:
@@ -76,8 +79,6 @@ properties:
      - compatible
      - "#pwm-cells"

    additionalProperties: false

required:
  - compatible
  - mboxes
+4 −0
Original line number Diff line number Diff line
@@ -234,6 +234,7 @@ properties:
    patternProperties:
      "^[a-z0-9]+$":
        type: object
        additionalProperties: false

        properties:
          clocks:
@@ -252,6 +253,9 @@ properties:
              for controlling a power-gate.
              See ../reset/reset.txt for more details.

          power-domains:
            maxItems: 1

          '#power-domain-cells':
            const: 0
            description: Must be 0.
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ patternProperties:
  # All other properties should be child nodes with unit-address and 'reg'
  "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
    type: object
    additionalProperties: true
    properties:
      reg:
        maxItems: 1
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ properties:
patternProperties:
  "^.*@[0-9a-fA-F]+$":
    type: object
    additionalProperties: true
    properties:
      reg:
        maxItems: 1
Loading