From: Xing Tong Wu <xingtong_wu@163.com>
To: Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
xingtong.wu@siemens.com
Cc: jan.kiszka@siemens.com, tobias.schaffner@siemens.com,
cedric.hombourger@siemens.com, gerd.haeussler.ext@siemens.com
Subject: [PATCH] watchdog: wdat_wdt: Add timeout value as a param in ping method
Date: Sat, 7 Oct 2023 16:21:25 +0800 [thread overview]
Message-ID: <20231007082125.4699-1-xingtong_wu@163.com> (raw)
From: Xing Tong Wu <xingtong.wu@siemens.com>
According to the WDAT spec that states about WATCHDOG_ACTION_SET_COUNTDOWN_PERIOD:
"This action is required if WATCHDOG_ACTION_RESET does not explicitly write a new
countdown value to a register during a reset."
And that implies, WATCHDOG_ACTION_RESET may write a countdown value, thus may come
with a WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN, thus need the timeout value as parameter
or would otherwise write 0.
The watchdog for SIONCT6126 need a entry WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN for
WATCHDOG_ACTION_RESET action, I send this patch to support it.
Signed-off-by: Xing Tong Wu <xingtong.wu@siemens.com>
---
drivers/watchdog/wdat_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index 0ba99bed59fc..650fdc7996e1 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -269,7 +269,7 @@ static int wdat_wdt_stop(struct watchdog_device *wdd)
static int wdat_wdt_ping(struct watchdog_device *wdd)
{
- return wdat_wdt_run_action(to_wdat_wdt(wdd), ACPI_WDAT_RESET, 0, NULL);
+ return wdat_wdt_run_action(to_wdat_wdt(wdd), ACPI_WDAT_RESET, wdd->timeout, NULL);
}
static int wdat_wdt_set_timeout(struct watchdog_device *wdd,
--
2.25.1
next reply other threads:[~2023-10-07 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 8:21 Xing Tong Wu [this message]
2023-10-07 13:34 ` [PATCH] watchdog: wdat_wdt: Add timeout value as a param in ping method Guenter Roeck
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=20231007082125.4699-1-xingtong_wu@163.com \
--to=xingtong_wu@163.com \
--cc=cedric.hombourger@siemens.com \
--cc=gerd.haeussler.ext@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=tobias.schaffner@siemens.com \
--cc=wim@linux-watchdog.org \
--cc=xingtong.wu@siemens.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).