From: Conor Dooley <conor@kernel.org>
To: Nik Bune <n2h9z4@gmail.com>
Cc: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
skhan@linuxfoundation.org, stwiss.opensource@diasemi.com,
linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH] dt-bindings: watchdog: da9062-wdt: convert txt to yaml
Date: Thu, 12 Oct 2023 18:18:23 +0100 [thread overview]
Message-ID: <20231012-flaky-humvee-0a0532621940@spud> (raw)
In-Reply-To: <20231010211439.98458-1-n2h9z4@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4520 bytes --]
On Tue, Oct 10, 2023 at 11:14:39PM +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 v2:
> - Updated filename to be equal to compatible value.
> - Removed ">" in description fields.
> - Added optional properties to the example.
> - Removed reg property, as it is not present in the txt version.
>
>
> .../bindings/watchdog/da9062-wdt.txt | 34 -------------
> .../watchdog/dlg,da9062-watchdog.yaml | 49 +++++++++++++++++++
> 2 files changed, 49 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..9b7ffdb01da0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> @@ -0,0 +1,49 @@
> +# 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:
> + type: boolean
This property is a boolean...
> + 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.
... but you say "can be 0 or 1". Does this refer to the bit value, or
the property? There are no in-kernel users of this property as far as a
quick grep shows so it is a bi hard to tell.
Otherwise, I'm happy with this.
Thanks,
Conor.
> 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;
> + };
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-10-12 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 21:14 [v2 PATCH] dt-bindings: watchdog: da9062-wdt: convert txt to yaml Nik Bune
2023-10-12 17:18 ` Conor Dooley [this message]
2023-10-14 16:49 ` Nik Bune
2023-10-17 11:02 ` Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231012-flaky-humvee-0a0532621940@spud \
--to=conor@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=n2h9z4@gmail.com \
--cc=robh+dt@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stwiss.opensource@diasemi.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).