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 Original line Diff line number Diff line
@@ -144,6 +144,7 @@ patternProperties:
      it is stricter and always has two compatibles.
      it is stricter and always has two compatibles.
    type: object
    type: object
    $ref: '/schemas/simple-bus.yaml'
    $ref: '/schemas/simple-bus.yaml'
    unevaluatedProperties: false


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


  clocks:
  clocks:
    type: object
    type: object
    additionalProperties: false


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


  reset:
  reset:
    type: object
    type: object
    additionalProperties: false


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


  pwm:
  pwm:
    type: object
    type: object
    additionalProperties: false


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


    additionalProperties: false

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


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


          power-domains:
            maxItems: 1

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