[PATCH v2 1/7] dt-bindings: interconnect: Move interconnect child node definition

Bryan O'Donoghue posted 7 patches 2 years, 8 months ago
There is a newer version of this series
[PATCH v2 1/7] dt-bindings: interconnect: Move interconnect child node definition
Posted by Bryan O'Donoghue 2 years, 8 months ago
New properties should be defined before the allOf. Move the
patternProperties definition to before the additionalProperties: false in
this file.

Fixes: dfeef93fe3ee ("dt-bindings: interconnect: Convert snoc-mm to a sub-node of snoc")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../bindings/interconnect/qcom,rpm.yaml       | 62 +++++++++----------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 4b37aa88a375b..50b80ca07e433 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -62,6 +62,37 @@ properties:
   power-domains:
     maxItems: 1
 
+# Child node's properties
+patternProperties:
+  '^interconnect-[a-z0-9]+$':
+    type: object
+    description:
+      snoc-mm is a child of snoc, sharing snoc's register address space.
+
+    properties:
+      compatible:
+        enum:
+          - qcom,msm8939-snoc-mm
+
+      '#interconnect-cells':
+        const: 1
+
+      clock-names:
+        items:
+          - const: bus
+          - const: bus_a
+
+      clocks:
+        items:
+          - description: Bus Clock
+          - description: Bus A Clock
+
+    required:
+      - compatible
+      - '#interconnect-cells'
+      - clock-names
+      - clocks
+
 required:
   - compatible
   - reg
@@ -109,37 +140,6 @@ allOf:
             - description: Bus Clock
             - description: Bus A Clock
 
-      # Child node's properties
-      patternProperties:
-        '^interconnect-[a-z0-9]+$':
-          type: object
-          description:
-            snoc-mm is a child of snoc, sharing snoc's register address space.
-
-          properties:
-            compatible:
-              enum:
-                - qcom,msm8939-snoc-mm
-
-            '#interconnect-cells':
-              const: 1
-
-            clock-names:
-              items:
-                - const: bus
-                - const: bus_a
-
-            clocks:
-              items:
-                - description: Bus Clock
-                - description: Bus A Clock
-
-          required:
-            - compatible
-            - '#interconnect-cells'
-            - clock-names
-            - clocks
-
   - if:
       properties:
         compatible:
-- 
2.34.1
Re: [PATCH v2 1/7] dt-bindings: interconnect: Move interconnect child node definition
Posted by Krzysztof Kozlowski 2 years, 8 months ago
On 03/01/2023 02:08, Bryan O'Donoghue wrote:
> New properties should be defined before the allOf. Move the
> patternProperties definition to before the additionalProperties: false in
> this file.

Your commit description suggests it is just a move but it is not.
Instead you make these properties available for all compatibles, which
is not justified here.

Either provide full explanation why making such change or make the move
equivalent by disallowing the properties for other variants.

> 
> Fixes: dfeef93fe3ee ("dt-bindings: interconnect: Convert snoc-mm to a sub-node of snoc")

There is no bug to fix, at least no bug described in commit msg. Style
and convention issues are not bugs and not worth backporting. Drop the
Fixes.

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Best regards,
Krzysztof