Skip to content

Commit 1a4aaf9

Browse files
mansrWim Van Sebroeck
authored andcommitted
watchdog: gpio: add support for nowayout option
Add support for the nowayout option in the gpio watchdog driver. Signed-off-by: Mans Rullgard <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent b7fbd3e commit 1a4aaf9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/watchdog/gpio_wdt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
#include <linux/platform_device.h>
1414
#include <linux/watchdog.h>
1515

16+
static bool nowayout = WATCHDOG_NOWAYOUT;
17+
module_param(nowayout, bool, 0);
18+
MODULE_PARM_DESC(nowayout,
19+
"Watchdog cannot be stopped once started (default="
20+
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
21+
1622
#define SOFT_TIMEOUT_MIN 1
1723
#define SOFT_TIMEOUT_DEF 60
1824

@@ -151,6 +157,7 @@ static int gpio_wdt_probe(struct platform_device *pdev)
151157
priv->wdd.timeout = SOFT_TIMEOUT_DEF;
152158

153159
watchdog_init_timeout(&priv->wdd, 0, dev);
160+
watchdog_set_nowayout(&priv->wdd, nowayout);
154161

155162
watchdog_stop_on_reboot(&priv->wdd);
156163

0 commit comments

Comments
 (0)