devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema
@ 2022-07-27 13:10 Conor Dooley
  2022-07-27 13:42 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Conor Dooley @ 2022-07-27 13:10 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski
  Cc: Jyri Sarha, Conor Dooley, linux-clk, devicetree, linux-kernel

Convert the simple GPIO clock gate Device Tree binding to json-schema
and fix-up references to this file in other text format bindings.
Jyri Sarha is the file's only editor/author so they have been added as
maintainer of the new yaml binding.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
The original file does not specifiy dual licensing, but when Geert did
the gpio-mux-clock conversion the yaml binding was created with dual,
so I have done the same thing here.
---
 .../bindings/clock/gpio-gate-clock.txt        | 21 ----------
 .../bindings/clock/gpio-gate-clock.yaml       | 42 +++++++++++++++++++
 .../devicetree/bindings/clock/ti/gate.txt     |  2 +-
 .../bindings/clock/ti/interface.txt           |  2 +-
 4 files changed, 44 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
 create mode 100644 Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml

diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt b/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
deleted file mode 100644
index d3379ff9b84b..000000000000
--- a/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Binding for simple gpio gated clock.
-
-This binding uses the common clock binding[1].
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be "gpio-gate-clock".
-- #clock-cells : from common clock binding; shall be set to 0.
-- enable-gpios : GPIO reference for enabling and disabling the clock.
-
-Optional properties:
-- clocks: Maximum of one parent clock is supported.
-
-Example:
-	clock {
-		compatible = "gpio-gate-clock";
-		clocks = <&parentclk>;
-		#clock-cells = <0>;
-		enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
new file mode 100644
index 000000000000..d09d0e3f0c6e
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/gpio-gate-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple GPIO clock gate
+
+maintainers:
+  - Jyri Sarha <jsarha@ti.com>
+
+properties:
+  compatible:
+    const: gpio-gate-clock
+
+  clocks:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 0
+
+  enable-gpios:
+    description: GPIO reference for enabling and disabling the clock.
+    maxItems: 1
+
+required:
+  - compatible
+  - '#clock-cells'
+  - enable-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    clock {
+        compatible = "gpio-gate-clock";
+        clocks = <&parentclk>;
+        #clock-cells = <0>;
+        enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+    };
diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
index b4820b1de4f0..4982615c01b9 100644
--- a/Documentation/devicetree/bindings/clock/ti/gate.txt
+++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
@@ -10,7 +10,7 @@ will be controlled instead and the corresponding hw-ops for
 that is used.
 
 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
+[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
 [3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
 
 Required properties:
diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
index 94ec77dc3c59..d3eb5ca92a7f 100644
--- a/Documentation/devicetree/bindings/clock/ti/interface.txt
+++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
@@ -9,7 +9,7 @@ companion clock finding (match corresponding functional gate
 clock) and hardware autoidle enable / disable.
 
 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
+[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
 
 Required properties:
 - compatible : shall be one of:
-- 
2.36.1


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

* Re: [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema
  2022-07-27 13:10 [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema Conor Dooley
@ 2022-07-27 13:42 ` Krzysztof Kozlowski
  2022-08-22 19:55 ` Conor.Dooley
  2022-08-22 23:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 13:42 UTC (permalink / raw)
  To: Conor Dooley, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski
  Cc: Jyri Sarha, linux-clk, devicetree, linux-kernel

On 27/07/2022 15:10, Conor Dooley wrote:
> Convert the simple GPIO clock gate Device Tree binding to json-schema
> and fix-up references to this file in other text format bindings.
> Jyri Sarha is the file's only editor/author so they have been added as
> maintainer of the new yaml binding.
> 
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> The original file does not specifiy dual licensing, but when Geert did
> the gpio-mux-clock conversion the yaml binding was created with dual,
> so I have done the same thing here.
> ---
>  .../bindings/clock/gpio-gate-clock.txt        | 21 ----------
>  .../bindings/clock/gpio-gate-clock.yaml       | 42 +++++++++++++++++++


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema
  2022-07-27 13:10 [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema Conor Dooley
  2022-07-27 13:42 ` Krzysztof Kozlowski
@ 2022-08-22 19:55 ` Conor.Dooley
  2022-08-22 23:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Conor.Dooley @ 2022-08-22 19:55 UTC (permalink / raw)
  To: Conor.Dooley, mturquette, sboyd, robh+dt, krzysztof.kozlowski+dt
  Cc: jsarha, linux-clk, devicetree, linux-kernel

On 27/07/2022 14:10, Conor Dooley wrote:

Hey Stephen,
Just a wee bump on this conversion.
Thanks,
Conor.

> Convert the simple GPIO clock gate Device Tree binding to json-schema
> and fix-up references to this file in other text format bindings.
> Jyri Sarha is the file's only editor/author so they have been added as
> maintainer of the new yaml binding.
> 
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> The original file does not specifiy dual licensing, but when Geert did
> the gpio-mux-clock conversion the yaml binding was created with dual,
> so I have done the same thing here.
> ---
>  .../bindings/clock/gpio-gate-clock.txt        | 21 ----------
>  .../bindings/clock/gpio-gate-clock.yaml       | 42 +++++++++++++++++++
>  .../devicetree/bindings/clock/ti/gate.txt     |  2 +-
>  .../bindings/clock/ti/interface.txt           |  2 +-
>  4 files changed, 44 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
>  create mode 100644 Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> 
> diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt b/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> deleted file mode 100644
> index d3379ff9b84b..000000000000
> --- a/Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -Binding for simple gpio gated clock.
> -
> -This binding uses the common clock binding[1].
> -
> -[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -
> -Required properties:
> -- compatible : shall be "gpio-gate-clock".
> -- #clock-cells : from common clock binding; shall be set to 0.
> -- enable-gpios : GPIO reference for enabling and disabling the clock.
> -
> -Optional properties:
> -- clocks: Maximum of one parent clock is supported.
> -
> -Example:
> -	clock {
> -		compatible = "gpio-gate-clock";
> -		clocks = <&parentclk>;
> -		#clock-cells = <0>;
> -		enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> -	};
> diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> new file mode 100644
> index 000000000000..d09d0e3f0c6e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/gpio-gate-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Simple GPIO clock gate
> +
> +maintainers:
> +  - Jyri Sarha <jsarha@ti.com>
> +
> +properties:
> +  compatible:
> +    const: gpio-gate-clock
> +
> +  clocks:
> +    maxItems: 1
> +
> +  '#clock-cells':
> +    const: 0
> +
> +  enable-gpios:
> +    description: GPIO reference for enabling and disabling the clock.
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - '#clock-cells'
> +  - enable-gpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    clock {
> +        compatible = "gpio-gate-clock";
> +        clocks = <&parentclk>;
> +        #clock-cells = <0>;
> +        enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> +    };
> diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
> index b4820b1de4f0..4982615c01b9 100644
> --- a/Documentation/devicetree/bindings/clock/ti/gate.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
> @@ -10,7 +10,7 @@ will be controlled instead and the corresponding hw-ops for
>  that is used.
>  
>  [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
>  [3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
>  
>  Required properties:
> diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
> index 94ec77dc3c59..d3eb5ca92a7f 100644
> --- a/Documentation/devicetree/bindings/clock/ti/interface.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
> @@ -9,7 +9,7 @@ companion clock finding (match corresponding functional gate
>  clock) and hardware autoidle enable / disable.
>  
>  [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
>  
>  Required properties:
>  - compatible : shall be one of:

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

* Re: [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema
  2022-07-27 13:10 [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema Conor Dooley
  2022-07-27 13:42 ` Krzysztof Kozlowski
  2022-08-22 19:55 ` Conor.Dooley
@ 2022-08-22 23:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2022-08-22 23:16 UTC (permalink / raw)
  To: Conor Dooley, Krzysztof Kozlowski, Michael Turquette, Rob Herring
  Cc: Jyri Sarha, Conor Dooley, linux-clk, devicetree, linux-kernel

Quoting Conor Dooley (2022-07-27 06:10:16)
> Convert the simple GPIO clock gate Device Tree binding to json-schema
> and fix-up references to this file in other text format bindings.
> Jyri Sarha is the file's only editor/author so they have been added as
> maintainer of the new yaml binding.
> 
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---

Applied to clk-next

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 13:10 [PATCH] dt-bindings: clock: gpio-gate-clock: Convert to json-schema Conor Dooley
2022-07-27 13:42 ` Krzysztof Kozlowski
2022-08-22 19:55 ` Conor.Dooley
2022-08-22 23:16 ` Stephen Boyd

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