2022-08-10 15:44:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties

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 <[email protected]>

---

Cc: Bjorn Andersson <[email protected]>
---
.../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


2022-08-10 19:27:11

by Prashant Malani

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties

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 <[email protected]>

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

Acked-by: Prashant Malani <[email protected]>

2022-08-11 06:24:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: chrome: google,cros-ec-type: restrict allowed properties

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 <[email protected]>
>
> 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 <[email protected]>


Best regards,
Krzysztof