Linux Watchdog driver development
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3] watchdog: ixp4xx: Rewrite driver to use core
Date: Fri, 13 Aug 2021 21:57:54 +0200	[thread overview]
Message-ID: <c1b353d5-4e31-eb12-5fe6-5fae8f05bebc@linaro.org> (raw)
In-Reply-To: <20210726121214.2572836-1-linus.walleij@linaro.org>

On 26/07/2021 14:12, Linus Walleij wrote:
> This rewrites the IXP4xx watchdog driver as follows:
> 
> - Spawn the watchdog driver as a platform device from the timer
>   driver. It's one device in the hardware, and the fact that
>   Linux splits the handling into two different devices is
>   a Linux pecularity, and thus it becomes a Linux pecularity
>   to spawn a separate watchdog driver.
> 
> - Spawn the watchdog driver from the timer driver at probe().
>   This is well after the timer driver as actually registered and
>   started and we know the register base is available.
> 
> - Instead of looping back callbacks to the timer drivers for all
>   watchdog calls, pass the register base to the watchdog driver
>   and manage the registers there. The two drivers aren't even
>   interested in the same register so the spinlock is totally
>   surplus, delete it.
> 
> - Replace pretty much all of the content in the watchdog driver
>   with a simple, modern watchdog driver utilizing the watchdog
>   core instead of registering its own misc device and ioctl()
>   handling.
> 
> - Drop module parameters as the same already exist in the
>   watchdog core.
> 
> What remains is a slim elegant (IMO) watchdog driver using the
> watchdog core, spawning from device tree or boardfile alike.
> 
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Depend on ARCH_IXP4XX since we use SoC code accessors (drop
>   COMPILE_TEST).
> - Drop <linux/init.h> use <linux/bits.h> rather than bitops.h
> - Fix some tabs vs spaces issues in the defines.
> - Call clk_disable_unprepare(d) directly from the devres
>   callback, the void * argument will be handled.
> ChangeLog v1->v2:
> - Pull out dirty patches underneath this patch. Tested on a
>   clean v5.14-rc1, sorry for the mess :(
> - Drop tick rate from the timer driver - was only used by this
>   watchdog after all.
> - Retrieve a clock from the parent to get rate if possible,
>   fallback to a default clock rate if not. Prepare and
>   enable the clock.
> - Add a devres hook to disable the clock after use.
> - Drop pointless platfrom_set_drvdata()
> - Put a more technically correct print at end of probe.
> Merge path: I expect this to be merged through the watchdog
> subsystem once the timer maintainers are happy with the patch,
> so Daniel or tglx: once you approve the patch please ACK this.
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

[ ... ]


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

      parent reply	other threads:[~2021-08-13 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 12:12 [PATCH v3] watchdog: ixp4xx: Rewrite driver to use core Linus Walleij
2021-07-29  4:10 ` Guenter Roeck
2021-08-13 19:57 ` Daniel Lezcano [this message]

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=c1b353d5-4e31-eb12-5fe6-5fae8f05bebc@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tglx@linutronix.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