linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Sergey.Semin@baikalelectronics.ru,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Serge Semin <fancer.lancer@gmail.com>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Paul Burton <paulburton@kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one
Date: Fri, 6 Mar 2020 07:18:35 -0800	[thread overview]
Message-ID: <8c10be04-5aa2-af5e-7b15-262dcdc04875@roeck-us.net> (raw)
In-Reply-To: <20200306132803.770DC8030792@mail.baikalelectronics.ru>

On 3/6/20 5:27 AM, Sergey.Semin@baikalelectronics.ru wrote:
> From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> Modern device tree bindings are supposed to be created as YAML-files
> in accordane with dt-schema. This commit replaces the DW Watchdog
> legacy bare text bindings with YAML file. As before the the bindings
> states that the corresponding dts node is supposed to have a registers
> range reference, at least one clocks phandle reference, optional reset
> lines. Seeing all the platforms with DW Watchdog provide the watchdog
> interrupt property and since in further commit we'll alter the driver
> to use it for pre-timeout functionality implementation, lets declare
> the IRQ property to be required.
> 

First, this is not just a replacement - it changes semantics.

Second, I disagree with making interrupts mandatory. They are only needed
for pretimeout functionality, and not everyone may want to enable that.
I don't see the point of forcing everyone to enable and provide functionality
that is neither wanted or needed for a given use case. Yes, the interrupt
is provided by all users today, but we may have one coming up tomorrow
where the interrupt line is not even wired up. What then ?

Guenter

> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> ---
>  .../devicetree/bindings/watchdog/dw_wdt.txt   | 24 -------
>  .../bindings/watchdog/snps,dw-wdt.yaml        | 66 +++++++++++++++++++
>  2 files changed, 66 insertions(+), 24 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> deleted file mode 100644
> index eb0914420c7c..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Synopsys Designware Watchdog Timer
> -
> -Required Properties:
> -
> -- compatible	: Should contain "snps,dw-wdt"
> -- reg		: Base address and size of the watchdog timer registers.
> -- clocks	: phandle + clock-specifier for the clock that drives the
> -		watchdog timer.
> -
> -Optional Properties:
> -
> -- interrupts	: The interrupt used for the watchdog timeout warning.
> -- resets	: phandle pointing to the system reset controller with
> -		line index for the watchdog.
> -
> -Example:
> -
> -	watchdog0: wd@ffd02000 {
> -		compatible = "snps,dw-wdt";
> -		reg = <0xffd02000 0x1000>;
> -		interrupts = <0 171 4>;
> -		clocks = <&per_base_clk>;
> -		resets = <&rst WDT0_RESET>;
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> new file mode 100644
> index 000000000000..8b30f9601c38
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Copyright (C) 2019 BAIKAL ELECTRONICS, JSC
> +#
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/snps,dw-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Synopsys Designware Watchdog Timer
> +
> +allOf:
> +  - $ref: "watchdog.yaml#"
> +
> +maintainers:
> +  - Jamie Iles <jamie@jamieiles.com>
> +
> +properties:
> +  compatible:
> +    const: snps,dw-wdt
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: DW Watchdog pre-timeout interrupts.
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1
> +    items:
> +      - description: Watchdog timer reference clock.
> +      - description: APB3 interface clock.
> +
> +  clock-names:
> +    minItems: 1
> +    items:
> +      - const: tclk
> +      - const: pclk
> +
> +  assigned-clocks: true
> +
> +  assigned-clock-rates: true
> +
> +  resets:
> +    description: Phandle to the DW Watchdog reset lane.
> +    maxItems: 1
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +
> +examples:
> +  - |
> +    watchdog0: watchdog@ffd02000 {
> +      compatible = "snps,dw-wdt";
> +      reg = <0xffd02000 0x1000>;
> +      interrupts = <0 171 4>;
> +      clocks = <&per_base_clk>;
> +      resets = <&wdt_rst>;
> +    };
> +...
> 


  reply	other threads:[~2020-03-06 15:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200306132747.14701-1-Sergey.Semin@baikalelectronics.ru>
2020-03-06 13:27 ` [PATCH 1/7] dt-bindings: watchdog: dw-wdt: Replace legacy bindings file with YAML-based one Sergey.Semin
2020-03-06 15:18   ` Guenter Roeck [this message]
     [not found]   ` <20200306151839.374AA80307C2@mail.baikalelectronics.ru>
2020-04-07 17:48     ` Sergey Semin
2020-03-06 13:27 ` [PATCH 2/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property Sergey.Semin
2020-03-12 22:22   ` Rob Herring
2020-03-06 13:27 ` [PATCH 3/7] watchdog: watchdog_dev: Use generic msec-per-sec macro Sergey.Semin
2020-03-06 15:20   ` Guenter Roeck
     [not found]   ` <20200306152033.4444780307C4@mail.baikalelectronics.ru>
2020-04-09 18:56     ` Sergey Semin
2020-03-06 13:27 ` [PATCH 4/7] watchdog: dw_wdt: Support devices with non-fixed TOP values Sergey.Semin
2020-03-15 14:12   ` Guenter Roeck
2020-04-10 12:59     ` Sergey Semin
2020-04-10 16:21       ` Guenter Roeck
2020-04-10 19:45         ` Sergey Semin
2020-04-11  1:15           ` Guenter Roeck
2020-04-11 11:10             ` Sergey Semin
2020-03-06 13:27 ` [PATCH 5/7] watchdog: dw_wdt: Support devices with asynch clocks Sergey.Semin
2020-03-15 14:22   ` Guenter Roeck
2020-04-10 18:59     ` Sergey Semin
2020-04-13 20:52       ` Stephen Boyd
2020-04-14  2:55         ` Guenter Roeck
2020-04-14 10:01           ` Sergey Semin
2020-03-06 13:27 ` [PATCH 6/7] watchdog: dw_wdt: Add pre-timeouts support Sergey.Semin
2020-03-06 15:14   ` Guenter Roeck
     [not found]   ` <20200306151455.7470180307C4@mail.baikalelectronics.ru>
2020-04-10 19:04     ` Sergey Semin
2020-03-06 13:27 ` [PATCH 7/7] watchdog: dw_wdt: Add DebugFS files Sergey.Semin
2020-03-06 15:12   ` Guenter Roeck
     [not found]   ` <20200306151248.DE1EC80307C4@mail.baikalelectronics.ru>
2020-04-10 19:12     ` Sergey Semin
2020-03-10  0:32 ` [PATCH 0/7] watchdog: dw_wdt: Take Baikal-T1 DW WDT peculiarities into account Sergey Semin

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=8c10be04-5aa2-af5e-7b15-262dcdc04875@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --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).