Skip to contentSkip to conversation

dt-bindings: watchdog: nxp,pnx4008-wdt: convert txt to yaml

PATCH Superseded Nik Bune 2 participants 2 messages Nov 4, 2023 – Nov 5, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nik Bune

author
#0 lore raw

PATCH 1/1 dt-bindings: watchdog: nxp,pnx4008-wdt: convert txt to yaml

Convert txt file to yaml. Add maintainers from git blame.

---
 .../bindings/watchdog/nxp,pnx4008-wdt.yaml    | 34 +++++++++++++++++++
 .../bindings/watchdog/pnx4008-wdt.txt         | 17 ----------
 2 files changed, 34 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml
 delete mode 100644 Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +34 -0
new file mode 100644
index 000000000000..86b691a339b5
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/nxp,pnx4008-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PNX watchdog timer
+
+allOf:
+  - $ref: watchdog.yaml#
+
+maintainers:
+  - Roland Stigge <[email protected]>
+
+properties:
+  compatible:
+    const: nxp,pnx4008-wdt
+
+  reg:
+    maxItems: 1
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    watchdog@4003c000 {
+        compatible = "nxp,pnx4008-wdt";
+        reg = <0x4003C000 0x1000>;
+        timeout-sec = <10>;
+    };
Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt deleted +0 -17
deleted file mode 100644
index 4b76bec62af9..000000000000
@@ -1,17 +0,0 @@
-* NXP PNX watchdog timer
-
-Required properties:
-- compatible: must be "nxp,pnx4008-wdt"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-
-Optional properties:
-- timeout-sec: contains the watchdog timeout in seconds.
-
-Example:
-
-	watchdog@4003c000 {
-		compatible = "nxp,pnx4008-wdt";
-		reg = <0x4003C000 0x1000>;
-		timeout-sec = <10>;
-	};
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Nik Bune

Convert txt file to yaml. Add maintainers from git blame.

Thank you for your patch. There is something to discuss/improve - few nits.

Quoted 13 lines
---
 .../bindings/watchdog/nxp,pnx4008-wdt.yaml    | 34 +++++++++++++++++++
 .../bindings/watchdog/pnx4008-wdt.txt         | 17 ----------
 2 files changed, 34 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml
 delete mode 100644 Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +0 -0
new file mode 100644
index 000000000000..86b691a339b5

Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml line 10

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +10 -0
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/nxp,pnx4008-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PNX watchdog timer
+
+allOf:
+  - $ref: watchdog.yaml#

Put allOf: after maintainers: block. I know that many files do not follow this convention...

Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml line 22

Quoted 12 lines
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +12 -0
+
+maintainers:
+  - Roland Stigge <[email protected]>
+
+properties:
+  compatible:
+    const: nxp,pnx4008-wdt
+
+  reg:
+    maxItems: 1
+
+unevaluatedProperties: false

And this goes after required: block.

Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml line 32

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +10 -0
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    watchdog@4003c000 {
+        compatible = "nxp,pnx4008-wdt";
+        reg = <0x4003C000 0x1000>;

Lower-case hex please.

Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml line 34

Quoted 2 lines
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml new file +2 -0
+        timeout-sec = <10>;
+    };

Best regards,
Krzysztof