Skip to content

Commit

Permalink
watchdog: wdat_wdt: Add timeout value as a param in ping method
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
Xing Tong Wu authored and Wim Van Sebroeck committed Oct 29, 2023
1 parent 7e5bca6 commit 725b6a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/wdat_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 725b6a8

Please sign in to comment.