Commit 1a4aaf9f authored by Mans Rullgard's avatar Mans Rullgard Committed by Wim Van Sebroeck

watchdog: gpio: add support for nowayout option

Add support for the nowayout option in the gpio watchdog driver.
Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent b7fbd3e5
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/watchdog.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_MIN 1
#define SOFT_TIMEOUT_DEF 60 #define SOFT_TIMEOUT_DEF 60
...@@ -151,6 +157,7 @@ static int gpio_wdt_probe(struct platform_device *pdev) ...@@ -151,6 +157,7 @@ static int gpio_wdt_probe(struct platform_device *pdev)
priv->wdd.timeout = SOFT_TIMEOUT_DEF; priv->wdd.timeout = SOFT_TIMEOUT_DEF;
watchdog_init_timeout(&priv->wdd, 0, dev); watchdog_init_timeout(&priv->wdd, 0, dev);
watchdog_set_nowayout(&priv->wdd, nowayout);
watchdog_stop_on_reboot(&priv->wdd); watchdog_stop_on_reboot(&priv->wdd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment