diff mbox series

dt-bindings: watchdog: davinci-wdt: convert txt to yaml

Message ID 20231021171323.113208-1-n2h9z4@gmail.com
State Superseded
Headers show
Series dt-bindings: watchdog: davinci-wdt: convert txt to yaml | expand

Commit Message

Nik Bune Oct. 21, 2023, 5:13 p.m. UTC
Convert txt file to yaml.
Add maintainers list. Took from ti,rti-wdt.yaml file. 

Signed-off-by: Nik Bune <n2h9z4@gmail.com>
---
 .../bindings/watchdog/davinci-wdt.txt         | 24 ---------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml

Comments

Conor Dooley Oct. 23, 2023, 5:02 p.m. UTC | #1
I'd swear I replied here already, but I checked on lore and saw
nothing...

On Sat, Oct 21, 2023 at 07:13:23PM +0200, Nik Bune wrote:
> Convert txt file to yaml.
> Add maintainers list. Took from ti,rti-wdt.yaml file. 
> 
> Signed-off-by: Nik Bune <n2h9z4@gmail.com>
> ---
>  .../bindings/watchdog/davinci-wdt.txt         | 24 ---------
>  .../bindings/watchdog/ti,davinci-wdt.yaml     | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 24 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
> deleted file mode 100644
> index aa10b8ec36e2..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
> -
> -Required properties:
> -- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt"
> -- reg : Should contain WDT registers location and length
> -
> -Optional properties:
> -- timeout-sec : Contains the watchdog timeout in seconds
> -- clocks : the clock feeding the watchdog timer.
> -	   Needed if platform uses clocks.
> -	   See clock-bindings.txt
> -
> -Documentation:
> -Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
> -Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
> -
> -Examples:
> -
> -wdt: wdt@2320000 {
> -	compatible = "ti,davinci-wdt";
> -	reg = <0x02320000 0x80>;
> -	timeout-sec = <30>;
> -	clocks = <&clkwdtimer0>;
> -};
> diff --git a/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
> new file mode 100644
> index 000000000000..357c1effff49
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
> +
> +description: |
> +  Documentation:
> +  Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
> +  Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a
> +
> +maintainers:
> +  - Tero Kristo <t-kristo@ti.com>
> +
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,davinci-wdt
> +      - ti,keystone-wdt
> +
> +  reg:
> +    maxItems: 1
> +

> +  timeout-sec: true

Cos of the unevaluatedProperties below, and the reference to
watchdog.yaml, setting timeout-sec: true here is not required.

> +
> +  clocks:
> +    description:
> +      the clock feeding the watchdog timer.
> +      Needed if platform uses clocks.
> +      See clock-bindings.txt

This can just be

clocks:
  maxItems: 1

Although I suspect there are no platforms that do not actually use
clocks, and really this should be required...

Cheers,
Conor.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog@2320000 {
> +        compatible = "ti,davinci-wdt";
> +        reg = <0x02320000 0x80>;
> +        timeout-sec = <30>;
> +        clocks = <&clkwdtimer0>;
> +    };
> -- 
> 2.34.1
Krzysztof Kozlowski Oct. 23, 2023, 5:12 p.m. UTC | #2
On 23/10/2023 19:02, Conor Dooley wrote:
> I'd swear I replied here already, but I checked on lore and saw
> nothing...

You're almost right:
https://lore.kernel.org/all/20231022120328.137788-1-n2h9z4@gmail.com/
Different binding, but same things to fix. :)


Best regards,
Krzysztof
Rob Herring Oct. 24, 2023, 7:54 p.m. UTC | #3
On Mon, Oct 23, 2023 at 07:12:16PM +0200, Krzysztof Kozlowski wrote:
> On 23/10/2023 19:02, Conor Dooley wrote:
> > I'd swear I replied here already, but I checked on lore and saw
> > nothing...
> 
> You're almost right:
> https://lore.kernel.org/all/20231022120328.137788-1-n2h9z4@gmail.com/
> Different binding, but same things to fix. :)

Welcome to the blur of DT maintainership. :)

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
deleted file mode 100644
index aa10b8ec36e2..000000000000
--- a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
+++ /dev/null
@@ -1,24 +0,0 @@ 
-Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
-
-Required properties:
-- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt"
-- reg : Should contain WDT registers location and length
-
-Optional properties:
-- timeout-sec : Contains the watchdog timeout in seconds
-- clocks : the clock feeding the watchdog timer.
-	   Needed if platform uses clocks.
-	   See clock-bindings.txt
-
-Documentation:
-Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
-Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
-
-Examples:
-
-wdt: wdt@2320000 {
-	compatible = "ti,davinci-wdt";
-	reg = <0x02320000 0x80>;
-	timeout-sec = <30>;
-	clocks = <&clkwdtimer0>;
-};
diff --git a/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
new file mode 100644
index 000000000000..357c1effff49
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
+
+description: |
+  Documentation:
+  Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
+  Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a
+
+maintainers:
+  - Tero Kristo <t-kristo@ti.com>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ti,davinci-wdt
+      - ti,keystone-wdt
+
+  reg:
+    maxItems: 1
+
+  timeout-sec: true
+
+  clocks:
+    description:
+      the clock feeding the watchdog timer.
+      Needed if platform uses clocks.
+      See clock-bindings.txt
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@2320000 {
+        compatible = "ti,davinci-wdt";
+        reg = <0x02320000 0x80>;
+        timeout-sec = <30>;
+        clocks = <&clkwdtimer0>;
+    };