diff mbox series

dt-bindings: example-schema: don't use enum as fallback, explain clock-names

Message ID 20230612092611.12385-1-krzysztof.kozlowski@linaro.org
State Accepted, archived
Headers show
Series dt-bindings: example-schema: don't use enum as fallback, explain clock-names | 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 June 12, 2023, 9:26 a.m. UTC
Compatibles with multiple entries should have usually only one fallback
compatible thus enum followed by enum is not a common case.  Use 'const'
as second compatible to show the recommended approach.

Explain also when clock-names are not really necessary.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/example-schema.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Rob Herring (Arm) June 15, 2023, 5:25 p.m. UTC | #1
On Mon, 12 Jun 2023 11:26:11 +0200, Krzysztof Kozlowski wrote:
> Compatibles with multiple entries should have usually only one fallback
> compatible thus enum followed by enum is not a common case.  Use 'const'
> as second compatible to show the recommended approach.
> 
> Explain also when clock-names are not really necessary.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/example-schema.yaml | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml
index f4eec4c42fb3..a41f9b9a196b 100644
--- a/Documentation/devicetree/bindings/example-schema.yaml
+++ b/Documentation/devicetree/bindings/example-schema.yaml
@@ -52,8 +52,7 @@  properties:
               - vendor,soc4-ip
               - vendor,soc3-ip
               - vendor,soc2-ip
-          - enum:
-              - vendor,soc1-ip
+          - const: vendor,soc1-ip
         # additionalItems being false is implied
         # minItems/maxItems equal to 2 is implied
       - items:
@@ -85,6 +84,9 @@  properties:
       discouraged.
 
   clock-names:
+    # For single-entry lists in clocks, resets etc., the xxx-names often do not
+    # bring any value, especially if they copy the IP block name.  In such case
+    # just skip the xxx-names.
     items:
       - const: bus