linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string
@ 2022-04-05  7:56 Kunihiko Hayashi
  2022-04-06 18:18 ` Rob Herring
  2022-04-07  9:33 ` Philipp Zabel
  0 siblings, 2 replies; 3+ messages in thread
From: Kunihiko Hayashi @ 2022-04-05  7:56 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski
  Cc: Masami Hiramatsu, devicetree, linux-arm-kernel, linux-kernel,
	Kunihiko Hayashi

Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 .../reset/socionext,uniphier-glue-reset.yaml  | 52 ++++++++++++++-----
 1 file changed, 38 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml b/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml
index bfbd3e9b4186..0a2c13e1e230 100644
--- a/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml
+++ b/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml
@@ -38,25 +38,49 @@ properties:
     minItems: 1
     maxItems: 2
 
-  clock-names:
-    oneOf:
-      - items:           # for Pro4, Pro5
-          - const: gio
-          - const: link
-      - items:           # for others
-          - const: link
+  clock-names: true
 
   resets:
     minItems: 1
     maxItems: 2
 
-  reset-names:
-    oneOf:
-      - items:           # for Pro4, Pro5
-          - const: gio
-          - const: link
-      - items:           # for others
-          - const: link
+  reset-names: true
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - socionext,uniphier-pro4-usb3-reset
+              - socionext,uniphier-pro5-usb3-reset
+              - socionext,uniphier-pro4-ahci-reset
+    then:
+      properties:
+        clocks:
+          minItems: 2
+          maxItems: 2
+        clock-names:
+          items:
+            - const: gio
+            - const: link
+        resets:
+          minItems: 2
+          maxItems: 2
+        reset-names:
+          items:
+            - const: gio
+            - const: link
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          const: link
+        resets:
+          maxItems: 1
+        reset-names:
+          const: link
 
 additionalProperties: false
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string
  2022-04-05  7:56 [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string Kunihiko Hayashi
@ 2022-04-06 18:18 ` Rob Herring
  2022-04-07  9:33 ` Philipp Zabel
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-04-06 18:18 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Krzysztof Kozlowski, Philipp Zabel, devicetree, linux-arm-kernel,
	Rob Herring, linux-kernel, Masami Hiramatsu

On Tue, 05 Apr 2022 16:56:18 +0900, Kunihiko Hayashi wrote:
> Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
> resets, and their names that can be taken by the compatible string.
> 
> The order of clock-names and reset-names doesn't change here.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
>  .../reset/socionext,uniphier-glue-reset.yaml  | 52 ++++++++++++++-----
>  1 file changed, 38 insertions(+), 14 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string
  2022-04-05  7:56 [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string Kunihiko Hayashi
  2022-04-06 18:18 ` Rob Herring
@ 2022-04-07  9:33 ` Philipp Zabel
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2022-04-07  9:33 UTC (permalink / raw)
  To: Kunihiko Hayashi, Rob Herring, Krzysztof Kozlowski
  Cc: Masami Hiramatsu, devicetree, linux-arm-kernel, linux-kernel

On Di, 2022-04-05 at 16:56 +0900, Kunihiko Hayashi wrote:
> Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
> resets, and their names that can be taken by the compatible string.
> 
> The order of clock-names and reset-names doesn't change here.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

Thank you, applied to reset/next.

regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-04-07  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-05  7:56 [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string Kunihiko Hayashi
2022-04-06 18:18 ` Rob Herring
2022-04-07  9:33 ` Philipp Zabel

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