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:
Родитель
b7fbd3e55c
Коммит
1a4aaf9f11
|
@ -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)
|
||||||
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);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче