diff mbox series

[v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties

Message ID 20220811062245.4316-1-krzysztof.kozlowski@linaro.org
State Accepted, archived
Headers show
Series [v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Krzysztof Kozlowski Aug. 11, 2022, 6:22 a.m. UTC
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>

---

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>

Changes since v1:
1. Correct subject prefix
---
 .../bindings/chrome/google,cros-ec-typec.yaml     | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

Rob Herring Aug. 12, 2022, 4:56 p.m. UTC | #1
On Thu, 11 Aug 2022 09:22:45 +0300, Krzysztof Kozlowski wrote:
> 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>
> 
> ---
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> Changes since v1:
> 1. Correct subject prefix
> ---
>  .../bindings/chrome/google,cros-ec-typec.yaml     | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
index 2d98f7c4d3bc..50ebd8c57795 100644
--- a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
+++ b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
@@ -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:
   - |+