Skip to contentSkip to conversation

dt-bindings: gpio: Convert TI TPIC2810 GPIO Controller bindings to YAML

PATCH Superseded Aparna M 3 participants 3 messages Oct 4, 2021 – Oct 12, 2021

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Aparna M

author
#0 lore raw

PATCH v2 1/1 dt-bindings: gpio: Convert TI TPIC2810 GPIO Controller bindings to YAML

Convert gpio-tpic2810 bindings to yaml format and remove outdated bindings in .txt format.

---
 .../bindings/gpio/gpio-tpic2810.txt           | 16 -------
 .../bindings/gpio/gpio-tpic2810.yaml          | 48 +++++++++++++++++++
 2 files changed, 48 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml
Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt deleted +0 -16
deleted file mode 100644
index 1afc2de7a537..000000000000
@@ -1,16 +0,0 @@
-TPIC2810 GPIO controller bindings
-
-Required properties:
- - compatible		: Should be "ti,tpic2810".
- - reg			: The I2C address of the device
- - gpio-controller	: Marks the device node as a GPIO controller.
- - #gpio-cells		: Should be two. For consumer use see gpio.txt.
-
-Example:
-
-	gpio@60 {
-		compatible = "ti,tpic2810";
-		reg = <0x60>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw

Hi Aparna,

Quoted 5 lines · Aparna M

Convert gpio-tpic2810 bindings to yaml format and remove outdated bindings in .txt format.

---

Thank you for making the requested changes.

Thanks,
Aswath

Quoted 83 lines
 .../bindings/gpio/gpio-tpic2810.txt           | 16 -------
 .../bindings/gpio/gpio-tpic2810.yaml          | 48 +++++++++++++++++++
 2 files changed, 48 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml
Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt deleted +0 -16
deleted file mode 100644
index 1afc2de7a537..000000000000
@@ -1,16 +0,0 @@
-TPIC2810 GPIO controller bindings
-
-Required properties:
- - compatible		: Should be "ti,tpic2810".
- - reg			: The I2C address of the device
- - gpio-controller	: Marks the device node as a GPIO controller.
- - #gpio-cells		: Should be two. For consumer use see gpio.txt.
-
-Example:
-
-	gpio@60 {
-		compatible = "ti,tpic2810";
-		reg = <0x60>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +48 -0
new file mode 100644
index 000000000000..811aee483f43
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-tpic2810.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TPIC2810 GPIO controller bindings
+
+maintainers:
+  - Aswath Govindraju <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - ti,tpic2810
+
+  reg:
+    maxItems: 1
+    description: The I2C address of the device
+
+  gpio-controller: true
+
+  "#gpio-cells":
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - "#gpio-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c1 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        gpio@60 {
+            compatible = "ti,tpic2810";
+            reg = <0x60>;
+            gpio-controller;
+            #gpio-cells = <2>;
+        };
+    };
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Aparna M
Quoted 48 lines · Aparna M

Convert gpio-tpic2810 bindings to yaml format and remove outdated bindings in .txt format.

---
 .../bindings/gpio/gpio-tpic2810.txt           | 16 -------
 .../bindings/gpio/gpio-tpic2810.yaml          | 48 +++++++++++++++++++
 2 files changed, 48 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml
Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt deleted +0 -16
deleted file mode 100644
index 1afc2de7a537..000000000000
@@ -1,16 +0,0 @@
-TPIC2810 GPIO controller bindings
-
-Required properties:
- - compatible		: Should be "ti,tpic2810".
- - reg			: The I2C address of the device
- - gpio-controller	: Marks the device node as a GPIO controller.
- - #gpio-cells		: Should be two. For consumer use see gpio.txt.
-
-Example:
-
-	gpio@60 {
-		compatible = "ti,tpic2810";
-		reg = <0x60>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +9 -0
new file mode 100644
index 000000000000..811aee483f43
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-tpic2810.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TPIC2810 GPIO controller bindings
+
+maintainers:

Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml line 19

Quoted 10 lines
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +10 -0
+  - Aswath Govindraju <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - ti,tpic2810
+
+  reg:
+    maxItems: 1
+    description: The I2C address of the device

Drop generic descriptions.

Quoted 9 lines
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +9 -0
+
+  gpio-controller: true
+
+  "#gpio-cells":
+    const: 2
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml line 38

Quoted 10 lines
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +10 -0
+  - gpio-controller
+  - "#gpio-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c1 {

i2c {

With those changes,

Quoted 14 lines
Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml new file +10 -0
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        gpio@60 {
+            compatible = "ti,tpic2810";
+            reg = <0x60>;
+            gpio-controller;
+            #gpio-cells = <2>;
+        };
+    };
Signature · 1 line
2.17.1