diff mbox series

[v2,7/7] dt-bindings: watchdog: allow "timer" as node name

Message ID 20230113103346.29381-8-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Headers show
Series watchdog: dt-bindings: rework/fix qcom-wdt | expand

Commit Message

Krzysztof Kozlowski Jan. 13, 2023, 10:33 a.m. UTC
On some SoCs the watchdog device is actually mixed with timer, e.g.
the qcom,msm-timer on older Qualcomm SoCs where this is actually one
hardware block responsible for both system timer and watchdog.

Allow calling such device nodes as "timer".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>

---

Changes since v1:
1. Add tag.

See also:
https://lore.kernel.org/linux-arm-msm/20221212163532.142533-1-krzysztof.kozlowski@linaro.org/T/#t

which causes warnings:

qcom-msm8960-cdp.dtb: timer@200a000: $nodename:0: 'timer@200a000' does not match '^watchdog(@.*|-[0-9a-f])?$'
  From schema: Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
---
 Documentation/devicetree/bindings/watchdog/watchdog.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Guenter Roeck Jan. 13, 2023, 2:03 p.m. UTC | #1
On Fri, Jan 13, 2023 at 11:33:46AM +0100, Krzysztof Kozlowski wrote:
> On some SoCs the watchdog device is actually mixed with timer, e.g.
> the qcom,msm-timer on older Qualcomm SoCs where this is actually one
> hardware block responsible for both system timer and watchdog.
> 
> Allow calling such device nodes as "timer".
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
> 

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

> ---
> 
> Changes since v1:
> 1. Add tag.
> 
> See also:
> https://lore.kernel.org/linux-arm-msm/20221212163532.142533-1-krzysztof.kozlowski@linaro.org/T/#t
> 
> which causes warnings:
> 
> qcom-msm8960-cdp.dtb: timer@200a000: $nodename:0: 'timer@200a000' does not match '^watchdog(@.*|-[0-9a-f])?$'
>   From schema: Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
> ---
>  Documentation/devicetree/bindings/watchdog/watchdog.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/watchdog.yaml b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> index fccae0d00110..519b48889eb1 100644
> --- a/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
> @@ -14,9 +14,14 @@ description: |
>    This document describes generic bindings which can be used to
>    describe watchdog devices in a device tree.
>  
> +select:
> +  properties:
> +    $nodename:
> +      pattern: "^watchdog(@.*|-[0-9a-f])?$"
> +
>  properties:
>    $nodename:
> -    pattern: "^watchdog(@.*|-[0-9a-f])?$"
> +    pattern: "^(timer|watchdog)(@.*|-[0-9a-f])?$"
>  
>    timeout-sec:
>      description:
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/watchdog.yaml b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
index fccae0d00110..519b48889eb1 100644
--- a/Documentation/devicetree/bindings/watchdog/watchdog.yaml
+++ b/Documentation/devicetree/bindings/watchdog/watchdog.yaml
@@ -14,9 +14,14 @@  description: |
   This document describes generic bindings which can be used to
   describe watchdog devices in a device tree.
 
+select:
+  properties:
+    $nodename:
+      pattern: "^watchdog(@.*|-[0-9a-f])?$"
+
 properties:
   $nodename:
-    pattern: "^watchdog(@.*|-[0-9a-f])?$"
+    pattern: "^(timer|watchdog)(@.*|-[0-9a-f])?$"
 
   timeout-sec:
     description: