mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:40:52 +07:00
watchdog: gpio: add support for nowayout option
Add support for the nowayout option in the gpio watchdog driver. Signed-off-by: Mans Rullgard <mans@mansr.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
b7fbd3e55c
commit
1a4aaf9f11
@ -13,6 +13,12 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/watchdog.h>
|
||||
|
||||
static bool nowayout = WATCHDOG_NOWAYOUT;
|
||||
module_param(nowayout, bool, 0);
|
||||
MODULE_PARM_DESC(nowayout,
|
||||
"Watchdog cannot be stopped once started (default="
|
||||
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
|
||||
|
||||
#define SOFT_TIMEOUT_MIN 1
|
||||
#define SOFT_TIMEOUT_DEF 60
|
||||
|
||||
@ -151,6 +157,7 @@ static int gpio_wdt_probe(struct platform_device *pdev)
|
||||
priv->wdd.timeout = SOFT_TIMEOUT_DEF;
|
||||
|
||||
watchdog_init_timeout(&priv->wdd, 0, dev);
|
||||
watchdog_set_nowayout(&priv->wdd, nowayout);
|
||||
|
||||
watchdog_stop_on_reboot(&priv->wdd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user