devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties
@ 2022-08-10 14:36 Krzysztof Kozlowski
  2022-08-10 18:36 ` Prashant Malani
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-10 14:36 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>

---

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 .../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] 3+ messages in thread

* Re: [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties
  2022-08-10 14:36 [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties Krzysztof Kozlowski
@ 2022-08-10 18:36 ` Prashant Malani
  2022-08-11  6:21   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Prashant Malani @ 2022-08-10 18:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Benson Leung, Guenter Roeck,
	devicetree, chrome-platform, linux-kernel, Bjorn Andersson

Hi Krzysztof,

On Aug 10 17:36, 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>

Micro-nit: the tag in the commit message is missing a trailing "c" in
"cros-ec-typec". Other than that,

Acked-by: Prashant Malani <pmalani@chromium.org>

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

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

On 10/08/2022 21:36, Prashant Malani wrote:
> Hi Krzysztof,
> 
> On Aug 10 17:36, 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>
> 
> Micro-nit: the tag in the commit message is missing a trailing "c" in
> "cros-ec-typec". Other than that,

Thanks.

> 
> Acked-by: Prashant Malani <pmalani@chromium.org>


Best regards,
Krzysztof

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

end of thread, other threads:[~2022-08-11  6:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 14:36 [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties Krzysztof Kozlowski
2022-08-10 18:36 ` Prashant Malani
2022-08-11  6:21   ` Krzysztof Kozlowski

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