Re: [PATCH] dt-bindings: watchdog: da9062-wdt: convert txt to yaml
From: Krzysztof Kozlowski
Date: Mon Oct 09 2023 - 04:59:36 EST
On 06/10/2023 13:11, Nik Bune wrote:
> Convert txt file to yaml.
Please mention changes done during conversion with justification (e.g.
adding reg already used by something).
>
...
> diff --git a/Documentation/devicetree/bindings/watchdog/da9062-wdt.yaml b/Documentation/devicetree/bindings/watchdog/da9062-wdt.yaml
> new file mode 100644
> index 000000000000..9911cc3068cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/da9062-wdt.yaml
Filename based on compatible, so:
dlg,da9062-watchdog.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/da9062-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dialog Semiconductor DA9062/61 Watchdog Timer
> +
> +maintainers:
> + - Steve Twiss <stwiss.opensource@xxxxxxxxxxx>
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - dlg,da9061-watchdog
> + - dlg,da9062-watchdog
> +
> + reg:
> + maxItems: 1
> +
> + dlg,use-sw-pm:
> + type: boolean
> + description: >
No need for >
> + 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
> + description: >
No need for >
> + 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
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + watchdog@fffffd00 {
> + compatible = "dlg,da9062-watchdog";
> + reg = <0xfffffd00 0x10>;
It's nice to add here some properties to make example complete.
> + };
Best regards,
Krzysztof