* [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml
@ 2022-02-10 15:54 Corentin Labbe
2022-02-10 16:17 ` Krzysztof Kozlowski
2022-02-10 22:25 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Corentin Labbe @ 2022-02-10 15:54 UTC (permalink / raw)
To: krzysztof.kozlowski, linux, robh+dt, wim
Cc: devicetree, linux-kernel, linux-watchdog, Corentin Labbe, Linus Walleij
Converts watchdog/faraday,ftwdt010.txt to yaml.
This permits to detect missing properties like clocks and resets or
compatible like moxa,moxart-watchdog.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
Changes since v1:
- Added myself as maintainer as requested by Linus
- Added $ref to watchdog.yaml
- Removed useless quotes
- Added blank lines between properties
- Removed timeout-sec as already provided by watchdog.yaml
Change since v2:
- rewrite compatible section
.../bindings/watchdog/faraday,ftwdt010.txt | 22 -------
.../bindings/watchdog/faraday,ftwdt010.yaml | 66 +++++++++++++++++++
2 files changed, 66 insertions(+), 22 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
create mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
deleted file mode 100644
index 9ecdb502e605..000000000000
--- a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Faraday Technology FTWDT010 watchdog
-
-This is an IP part from Faraday Technology found in the Gemini
-SoCs and others.
-
-Required properties:
-- compatible : must be one of
- "faraday,ftwdt010"
- "cortina,gemini-watchdog", "faraday,ftwdt010"
-- reg : shall contain base register location and length
-- interrupts : shall contain the interrupt for the watchdog
-
-Optional properties:
-- timeout-sec : the default watchdog timeout in seconds.
-
-Example:
-
-watchdog@41000000 {
- compatible = "faraday,ftwdt010";
- reg = <0x41000000 0x1000>;
- interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
-};
diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
new file mode 100644
index 000000000000..e7b90ba41093
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/faraday,ftwdt010.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Faraday Technology FTWDT010 watchdog
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+ - Corentin Labbe <clabbe@baylibre.com>
+
+description: |
+ This is an IP part from Faraday Technology found in the Gemini
+ SoCs and others.
+
+allOf:
+ - $ref: "watchdog.yaml#"
+
+properties:
+ compatible:
+ oneOf:
+ - const: faraday,ftwdt010
+ - items:
+ - enum:
+ - cortina,gemini-watchdog
+ - moxa,moxart-watchdog
+ - const: faraday,ftwdt010
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: PCLK
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ watchdog@41000000 {
+ compatible = "faraday,ftwdt010";
+ reg = <0x41000000 0x1000>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ - |
+ watchdog: watchdog@98500000 {
+ compatible = "moxa,moxart-watchdog", "faraday,ftwdt010";
+ reg = <0x98500000 0x10>;
+ clocks = <&clk_apb>;
+ clock-names = "PCLK";
+ };
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml
2022-02-10 15:54 [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml Corentin Labbe
@ 2022-02-10 16:17 ` Krzysztof Kozlowski
2022-02-10 22:25 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-10 16:17 UTC (permalink / raw)
To: Corentin Labbe, linux, robh+dt, wim
Cc: devicetree, linux-kernel, linux-watchdog, Linus Walleij
On 10/02/2022 16:54, Corentin Labbe wrote:
> Converts watchdog/faraday,ftwdt010.txt to yaml.
> This permits to detect missing properties like clocks and resets or
> compatible like moxa,moxart-watchdog.
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> Changes since v1:
> - Added myself as maintainer as requested by Linus
> - Added $ref to watchdog.yaml
> - Removed useless quotes
> - Added blank lines between properties
> - Removed timeout-sec as already provided by watchdog.yaml
>
> Change since v2:
> - rewrite compatible section
>
> .../bindings/watchdog/faraday,ftwdt010.txt | 22 -------
> .../bindings/watchdog/faraday,ftwdt010.yaml | 66 +++++++++++++++++++
> 2 files changed, 66 insertions(+), 22 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
> create mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
> deleted file mode 100644
> index 9ecdb502e605..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Faraday Technology FTWDT010 watchdog
> -
> -This is an IP part from Faraday Technology found in the Gemini
> -SoCs and others.
> -
> -Required properties:
> -- compatible : must be one of
> - "faraday,ftwdt010"
> - "cortina,gemini-watchdog", "faraday,ftwdt010"
> -- reg : shall contain base register location and length
> -- interrupts : shall contain the interrupt for the watchdog
> -
> -Optional properties:
> -- timeout-sec : the default watchdog timeout in seconds.
> -
> -Example:
> -
> -watchdog@41000000 {
> - compatible = "faraday,ftwdt010";
> - reg = <0x41000000 0x1000>;
> - interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
> -};
> diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
> new file mode 100644
> index 000000000000..e7b90ba41093
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/faraday,ftwdt010.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Faraday Technology FTWDT010 watchdog
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> + - Corentin Labbe <clabbe@baylibre.com>
> +
> +description: |
> + This is an IP part from Faraday Technology found in the Gemini
> + SoCs and others.
> +
> +allOf:
> + - $ref: "watchdog.yaml#"
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: faraday,ftwdt010
> + - items:
> + - enum:
> + - cortina,gemini-watchdog
> + - moxa,moxart-watchdog
> + - const: faraday,ftwdt010
I think you have indentation warnings.
> +
> + reg:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: PCLK
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
Are you sure your DTSes don't have warnings? You include watchdog.yaml
schema (good) so here should be unevaluatedProperties to accept ones
mentioned there.
Just add "timeout-sec" to example below to see the error.
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + watchdog@41000000 {
> + compatible = "faraday,ftwdt010";
> + reg = <0x41000000 0x1000>;
> + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
> + };
> + - |
> + watchdog: watchdog@98500000 {
> + compatible = "moxa,moxart-watchdog", "faraday,ftwdt010";
> + reg = <0x98500000 0x10>;
> + clocks = <&clk_apb>;
> + clock-names = "PCLK";
> + };
> +...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml
2022-02-10 15:54 [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml Corentin Labbe
2022-02-10 16:17 ` Krzysztof Kozlowski
@ 2022-02-10 22:25 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-02-10 22:25 UTC (permalink / raw)
To: Corentin Labbe
Cc: krzysztof.kozlowski, wim, robh+dt, linux-watchdog, devicetree,
linux, Linus Walleij, linux-kernel
On Thu, 10 Feb 2022 15:54:50 +0000, Corentin Labbe wrote:
> Converts watchdog/faraday,ftwdt010.txt to yaml.
> This permits to detect missing properties like clocks and resets or
> compatible like moxa,moxart-watchdog.
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> Changes since v1:
> - Added myself as maintainer as requested by Linus
> - Added $ref to watchdog.yaml
> - Removed useless quotes
> - Added blank lines between properties
> - Removed timeout-sec as already provided by watchdog.yaml
>
> Change since v2:
> - rewrite compatible section
>
> .../bindings/watchdog/faraday,ftwdt010.txt | 22 -------
> .../bindings/watchdog/faraday,ftwdt010.yaml | 66 +++++++++++++++++++
> 2 files changed, 66 insertions(+), 22 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
> create mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
./Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml:25:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml:26:11: [warning] wrong indentation: expected 12 but found 10 (indentation)
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1591202
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-10 22:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 15:54 [PATCH v3] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml Corentin Labbe
2022-02-10 16:17 ` Krzysztof Kozlowski
2022-02-10 22:25 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.