Skip to content

Commit 725b6a8

Browse files
Xing Tong WuWim Van Sebroeck
authored andcommitted
watchdog: wdat_wdt: Add timeout value as a param in ping method
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> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20231007082125.4699-1-xingtong_wu@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent 7e5bca6 commit 725b6a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/wdat_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int wdat_wdt_stop(struct watchdog_device *wdd)
269269

270270
static int wdat_wdt_ping(struct watchdog_device *wdd)
271271
{
272-
return wdat_wdt_run_action(to_wdat_wdt(wdd), ACPI_WDAT_RESET, 0, NULL);
272+
return wdat_wdt_run_action(to_wdat_wdt(wdd), ACPI_WDAT_RESET, wdd->timeout, NULL);
273273
}
274274

275275
static int wdat_wdt_set_timeout(struct watchdog_device *wdd,

0 commit comments

Comments
 (0)