devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: gpio: gpio-zevio: convert to dtschema
@ 2024-05-18 18:21 Pratik Farkase
  2024-05-18 20:38 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Pratik Farkase @ 2024-05-18 18:21 UTC (permalink / raw)
  Cc: Pratik Farkase, Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Pratik Farkase, linux-gpio,
	devicetree, linux-kernel

Convert Zevio GPIO Controller from text to dtschema.

Signed-off-by: Pratik Farkase <pratik.farkase@wsisweden.com>
---
 .../devicetree/bindings/gpio/gpio-zevio.txt   | 16 --------
 .../devicetree/bindings/gpio/gpio-zevio.yaml  | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-zevio.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-zevio.yaml

diff --git a/Documentation/devicetree/bindings/gpio/gpio-zevio.txt b/Documentation/devicetree/bindings/gpio/gpio-zevio.txt
deleted file mode 100644
index a37bd9ae2730..000000000000
--- a/Documentation/devicetree/bindings/gpio/gpio-zevio.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Zevio GPIO controller
-
-Required properties:
-- compatible: Should be "lsi,zevio-gpio"
-- reg: Address and length of the register set for the device
-- #gpio-cells: Should be two. The first cell is the pin number and the
-  second cell is used to specify optional parameters (currently unused).
-- gpio-controller: Marks the device node as a GPIO controller.
-
-Example:
-	gpio: gpio@90000000 {
-		compatible = "lsi,zevio-gpio";
-		reg = <0x90000000 0x1000>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zevio.yaml b/Documentation/devicetree/bindings/gpio/gpio-zevio.yaml
new file mode 100644
index 000000000000..3a6e428b7bf1
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-zevio.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-zevio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Zevio GPIO controller
+
+maintainers:
+  - Pratik Farkase <pratikfarkase94@gmail.com>
+
+properties:
+  compatible:
+    items:
+      - const: lsi,zevio-gpio
+
+  reg:
+    maxItems: 1
+
+  "#gpio-cells":
+    const: 2
+
+  gpio-controller: true
+
+required:
+  - compatible
+  - reg
+  - "#gpio-cells"
+  - gpio-controller
+
+additionalProperties: false
+
+examples:
+  - |
+      gpio@90000000 {
+        compatible = "lsi,zevio-gpio";
+        reg = <0x90000000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+      };
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: gpio: gpio-zevio: convert to dtschema
  2024-05-18 18:21 [PATCH] dt-bindings: gpio: gpio-zevio: convert to dtschema Pratik Farkase
@ 2024-05-18 20:38 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-18 20:38 UTC (permalink / raw)
  To: Pratik Farkase
  Cc: Pratik Farkase, Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-gpio, devicetree,
	linux-kernel

On 18/05/2024 20:21, Pratik Farkase wrote:
> Convert Zevio GPIO Controller from text to dtschema.
> 
> Signed-off-by: Pratik Farkase <pratik.farkase@wsisweden.com>
> ---
>  .../devicetree/bindings/gpio/gpio-zevio.txt   | 16 --------
>  .../devicetree/bindings/gpio/gpio-zevio.yaml  | 41 +++++++++++++++++++

Use compatible as filename.

>  2 files changed, 41 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-zevio.txt
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-zevio.yaml
> 

...

> +
> +  reg:
> +    maxItems: 1
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  gpio-controller: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#gpio-cells"
> +  - gpio-controller
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +      gpio@90000000 {

Misaligned/indented. Just use 4 space indentation for the example.



Best regards,
Krzysztof


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

end of thread, other threads:[~2024-05-18 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-18 18:21 [PATCH] dt-bindings: gpio: gpio-zevio: convert to dtschema Pratik Farkase
2024-05-18 20:38 ` Krzysztof Kozlowski

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