Commit e251a4e2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Rob Herring
Browse files

dt-bindings: usb: connector: disallow additional properties



USB connector bindings is complete, thus no additional properties should
be allowed.  Add missing 'reg' property and change additionalProperties
to false, so the schema will check for anything unexpected.  This also
allows to drop the 'reg' from other bindings referencing the
usb-connector.yaml and make it required.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230725102325.76336-1-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent b2ec7b9b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -29,10 +29,8 @@ properties:
patternProperties:
  '^connector@[0-9a-f]+$':
    $ref: /schemas/connector/usb-connector.yaml#
    unevaluatedProperties: false
    properties:
      reg:
        maxItems: 1
    required:
      - reg

required:
  - compatible
+4 −1
Original line number Diff line number Diff line
@@ -30,6 +30,9 @@ properties:
          - const: samsung,usb-connector-11pin
          - const: usb-b-connector

  reg:
    maxItems: 1

  label:
    description: Symbolic name for the connector.

@@ -264,7 +267,7 @@ anyOf:
        - typec-power-opmode
        - new-source-frs-typec-current

additionalProperties: true
additionalProperties: false

examples:
  # Micro-USB connector with HS lines routed via controller (MUIC).
+0 −6
Original line number Diff line number Diff line
@@ -38,15 +38,9 @@ properties:
patternProperties:
  '^connector@\d$':
    $ref: /schemas/connector/usb-connector.yaml#

    properties:
      reg: true

    required:
      - reg

    unevaluatedProperties: false

required:
  - compatible

+2 −4
Original line number Diff line number Diff line
@@ -43,10 +43,8 @@ properties:
patternProperties:
  '^connector@[01]$':
    $ref: /schemas/connector/usb-connector.yaml#
    unevaluatedProperties: false
    properties:
      reg:
        maxItems: 1
    required:
      - reg

required:
  - compatible