diff mbox series

[v3] dt-bindings: watchdog: da9062-wdt: convert txt to yaml

Message ID 20231014170434.159310-1-n2h9z4@gmail.com
State New
Headers show
Series [v3] dt-bindings: watchdog: da9062-wdt: convert txt to yaml | expand

Commit Message

Nik Bune Oct. 14, 2023, 5:04 p.m. UTC
Convert txt file to yaml.
Add a mainterner block. Took a value from dlg,da9063 PMIC.


Signed-off-by: Nik Bune <n2h9z4@gmail.com>
---

Changes in v3
- Changed type of dlg,wdt-sd property from boolean to uint32. Following the discussed in v2 patch thread. 

v2 patch: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231010211439.98458-1-n2h9z4@gmail.com/


 .../bindings/watchdog/da9062-wdt.txt          | 34 -------------
 .../watchdog/dlg,da9062-watchdog.yaml         | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 34 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml

Comments

Krzysztof Kozlowski Oct. 15, 2023, 9:29 a.m. UTC | #1
On 14/10/2023 19:04, Nik Bune wrote:
> Convert txt file to yaml.
> Add a mainterner block. Took a value from dlg,da9063 PMIC.
> 
> 

A nit (fix only if you send next version): just one blank line before
the SoB tag.

> Signed-off-by: Nik Bune <n2h9z4@gmail.com>

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

Best regards,
Krzysztof
Guenter Roeck Oct. 15, 2023, 12:28 p.m. UTC | #2
On Sat, Oct 14, 2023 at 07:04:34PM +0200, Nik Bune wrote:
> Convert txt file to yaml.
> Add a mainterner block. Took a value from dlg,da9063 PMIC.
> 
> 
> Signed-off-by: Nik Bune <n2h9z4@gmail.com>
> ---

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> 
> Changes in v3
> - Changed type of dlg,wdt-sd property from boolean to uint32. Following the discussed in v2 patch thread. 
> 
> v2 patch: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231010211439.98458-1-n2h9z4@gmail.com/
> 
> 
>  .../bindings/watchdog/da9062-wdt.txt          | 34 -------------
>  .../watchdog/dlg,da9062-watchdog.yaml         | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 34 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
> deleted file mode 100644
> index 354314d854ef..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -* Dialog Semiconductor DA9062/61 Watchdog Timer
> -
> -Required properties:
> -
> -- compatible: should be one of the following valid compatible string lines:
> -	"dlg,da9061-watchdog", "dlg,da9062-watchdog"
> -	"dlg,da9062-watchdog"
> -
> -Optional properties:
> -- dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
> -	Only use this option if you can't use the watchdog automatic suspend
> -	function during a suspend (see register CONTROL_B).
> -- dlg,wdt-sd: Set what happens on watchdog timeout. If this bit is set the
> -	watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
> -	POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
> -	default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
> -	set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
> -	chip's OTP settings.
> -
> -Example: DA9062
> -
> -	pmic0: da9062@58 {
> -		watchdog {
> -			compatible = "dlg,da9062-watchdog";
> -		};
> -	};
> -
> -Example: DA9061 using a fall-back compatible for the DA9062 watchdog driver
> -
> -	pmic0: da9061@58 {
> -		watchdog {
> -			compatible = "dlg,da9061-watchdog", "dlg,da9062-watchdog";
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> new file mode 100644
> index 000000000000..f058628bb632
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.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/dlg,da9062-watchdog.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dialog Semiconductor DA9062/61 Watchdog Timer
> +
> +maintainers:
> +  - Steve Twiss <stwiss.opensource@diasemi.com>
> +
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +properties:
> +  compatible:
> +    enum: 
> +      - dlg,da9061-watchdog
> +      - dlg,da9062-watchdog
> +
> +  dlg,use-sw-pm:
> +    type: boolean
> +    description:
> +      Add this property to disable the watchdog during suspend.
> +      Only use this option if you can't use the watchdog automatic suspend
> +      function during a suspend (see register CONTROL_B).
> +  
> +  dlg,wdt-sd:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 1]
> +    description:
> +      Set what happens on watchdog timeout. If this bit is set the
> +      watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
> +      POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
> +      default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
> +      set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
> +      chip's OTP settings.
> +
> +required:
> +  - compatible
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog {
> +      compatible = "dlg,da9062-watchdog";
> +      dlg,use-sw-pm;
> +      dlg,wdt-sd = <1>;
> +    };
> -- 
> 2.34.1
>
Rob Herring (Arm) Oct. 25, 2023, 8:01 p.m. UTC | #3
On Sat, 14 Oct 2023 19:04:34 +0200, Nik Bune wrote:
> Convert txt file to yaml.
> Add a mainterner block. Took a value from dlg,da9063 PMIC.
> 
> 
> Signed-off-by: Nik Bune <n2h9z4@gmail.com>
> ---
> 
> Changes in v3
> - Changed type of dlg,wdt-sd property from boolean to uint32. Following the discussed in v2 patch thread.
> 
> v2 patch: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231010211439.98458-1-n2h9z4@gmail.com/
> 
> 
>  .../bindings/watchdog/da9062-wdt.txt          | 34 -------------
>  .../watchdog/dlg,da9062-watchdog.yaml         | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 34 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> 

It seems watchdog bindings aren't getting applied, so I've applied it.
Wim, please take watchdog bindings in the future unless noted otherwise.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
deleted file mode 100644
index 354314d854ef..000000000000
--- a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
+++ /dev/null
@@ -1,34 +0,0 @@ 
-* Dialog Semiconductor DA9062/61 Watchdog Timer
-
-Required properties:
-
-- compatible: should be one of the following valid compatible string lines:
-	"dlg,da9061-watchdog", "dlg,da9062-watchdog"
-	"dlg,da9062-watchdog"
-
-Optional properties:
-- dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
-	Only use this option if you can't use the watchdog automatic suspend
-	function during a suspend (see register CONTROL_B).
-- dlg,wdt-sd: Set what happens on watchdog timeout. If this bit is set the
-	watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
-	POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
-	default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
-	set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
-	chip's OTP settings.
-
-Example: DA9062
-
-	pmic0: da9062@58 {
-		watchdog {
-			compatible = "dlg,da9062-watchdog";
-		};
-	};
-
-Example: DA9061 using a fall-back compatible for the DA9062 watchdog driver
-
-	pmic0: da9061@58 {
-		watchdog {
-			compatible = "dlg,da9061-watchdog", "dlg,da9062-watchdog";
-		};
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
new file mode 100644
index 000000000000..f058628bb632
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.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/dlg,da9062-watchdog.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor DA9062/61 Watchdog Timer
+
+maintainers:
+  - Steve Twiss <stwiss.opensource@diasemi.com>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    enum: 
+      - dlg,da9061-watchdog
+      - dlg,da9062-watchdog
+
+  dlg,use-sw-pm:
+    type: boolean
+    description:
+      Add this property to disable the watchdog during suspend.
+      Only use this option if you can't use the watchdog automatic suspend
+      function during a suspend (see register CONTROL_B).
+  
+  dlg,wdt-sd:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+    description:
+      Set what happens on watchdog timeout. If this bit is set the
+      watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
+      POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
+      default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
+      set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
+      chip's OTP settings.
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog {
+      compatible = "dlg,da9062-watchdog";
+      dlg,use-sw-pm;
+      dlg,wdt-sd = <1>;
+    };