Re: [PATCH v2] watchdog: sp805: re-enable the clock in the restart handler

From: Guenter Roeck

Date: Sat Nov 21 2026 - 20:29:01 EST


On Sun, Nov 22, 2026 at 04:45:25AM +0800, David Yang wrote:
> wdt_restart() fail to reboot the system if the watchdog counter clock
> was previously disabled: If userspace cleanly stops the watchdog, the
> core calls wdt_disable() which disables wdt->clk. No reset comes.
>
> Re-enable the clock in it as in npcm_wdt. The watchdog .restart()
> callback runs in atomic context: get the clock with
> devm_clk_get_optional_prepared() at probe time and keep it prepared for
> the lifetime of the driver, so the restart handler only needs
> clk_enable(), which is safe in atomic context.
>
> Link: https://lore.kernel.org/r/20260911031916.A8E051F000FF@xxxxxxxxxxxxxxx
> Fixes: 6c5c0d48b686 ("watchdog: sp805: add restart handler")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>

Applied.

Thanks,
Guenter