devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties
@ 2022-08-11  6:22 Krzysztof Kozlowski
  2022-08-12 16:56 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-11  6:22 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Benson Leung, Guenter Roeck,
	Prashant Malani, devicetree, chrome-platform, linux-kernel
  Cc: Krzysztof Kozlowski, Bjorn Andersson

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(-)

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:
   - |+
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties
  2022-08-11  6:22 [PATCH v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties Krzysztof Kozlowski
@ 2022-08-12 16:56 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2022-08-12 16:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Guenter Roeck, Benson Leung, linux-kernel, Krzysztof Kozlowski,
	chrome-platform, Rob Herring, devicetree, Bjorn Andersson,
	Prashant Malani

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-12 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11  6:22 [PATCH v2] dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties Krzysztof Kozlowski
2022-08-12 16:56 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).