Skip to content

Commit

Permalink
dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties
Browse files Browse the repository at this point in the history
Describe exactly what properties are allowed in Google Chrome OS EC Type
C port, so the schema can properly validate the DTS.  Existing DTS
defines always connectors with unit addresses, not a sole "connector"
child.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220811062245.4316-1-krzysztof.kozlowski@linaro.org
  • Loading branch information
Krzysztof Kozlowski authored and Rob Herring committed Aug 12, 2022
1 parent 07d1caa commit 8f42658
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ properties:
compatible:
const: google,cros-ec-typec

connector:
'#address-cells':
const: 1

'#size-cells':
const: 0

patternProperties:
'^connector@[0-9a-f]+$':
$ref: /schemas/connector/usb-connector.yaml#
unevaluatedProperties: false
properties:
reg:
maxItems: 1

required:
- compatible

additionalProperties: true #fixme
additionalProperties: false

examples:
- |+
Expand Down

0 comments on commit 8f42658

Please sign in to comment.