From: Guenter Roeck <linux@roeck-us.net>
To: Yang Siyuan <hsyysy@163.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] watchdog: sunxi_wdt: stop the watchdog across system suspend
Date: Tue, 17 Nov 2026 20:24:27 -0800 [thread overview]
Message-ID: <164e54ff-8a1f-4841-92eb-7fe1b7815a64@roeck-us.net> (raw)
In-Reply-To: <20261118005048.385059-1-hsyysy@163.com>
On Wed, Nov 18, 2026 at 08:50:48AM +0800, Yang Siyuan wrote:
> The H616 watchdog has a maximum timeout of 16 seconds. systemd keeps
> /dev/watchdog0 open with RuntimeWatchdogSec=16s, but during system
> suspend all userspace is frozen and the watchdog core does not stop the
> hardware. A suspend longer than the timeout therefore resets the board
> before it can resume.
>
> Add system sleep PM ops to stop the watchdog before suspend and restart
> it after resume if it was running. The driver did not store its private
> data in the platform device, so add platform_set_drvdata() for the PM
> callbacks.
>
> Use DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(), and use
> watchdog_hw_running() instead of a private flag to decide whether the
> hardware needs to be stopped and restarted.
>
> Tested on an Anbernic RG35XX-SP: a 30-second s2idle suspend resumes
> without the 16-second watchdog reset, and /dev/watchdog0 keeps working
> afterwards.
>
> Signed-off-by: Yang Siyuan <hsyysy@163.com>
Applied.
Thanks,
Guenter
prev parent reply other threads:[~2026-11-18 4:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 9:20 [PATCH] " Yang Siyuan
2026-11-17 10:40 ` [PATCH v2] " Yang Siyuan
2026-11-17 15:51 ` [PATCH] " kernel test robot
2026-11-17 23:18 ` [PATCH v3] " Yang Siyuan
2026-11-18 0:28 ` Guenter Roeck
2026-11-18 0:50 ` [PATCH v4] " Yang Siyuan
2026-11-18 4:24 ` Guenter Roeck [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=164e54ff-8a1f-4841-92eb-7fe1b7815a64@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hsyysy@163.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-watchdog@vger.kernel.org \
--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
all inboxes | Powered by JetHome®