linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: gpio: add support for nowayout option
@ 2019-05-28  9:09 Mans Rullgard
  2019-05-28 13:26 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Mans Rullgard @ 2019-05-28  9:09 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck; +Cc: linux-watchdog, linux-kernel

Add support for the nowayout option in the gpio watchdog driver.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 drivers/watchdog/gpio_wdt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c
index ea77cae03c9d..63792bb70213 100644
--- a/drivers/watchdog/gpio_wdt.c
+++ b/drivers/watchdog/gpio_wdt.c
@@ -17,6 +17,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
 
@@ -155,6 +161,7 @@ static int gpio_wdt_probe(struct platform_device *pdev)
 	priv->wdd.timeout	= SOFT_TIMEOUT_DEF;
 
 	watchdog_init_timeout(&priv->wdd, 0, &pdev->dev);
+	watchdog_set_nowayout(&priv->wdd, nowayout);
 
 	watchdog_stop_on_reboot(&priv->wdd);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: gpio: add support for nowayout option
  2019-05-28  9:09 [PATCH] watchdog: gpio: add support for nowayout option Mans Rullgard
@ 2019-05-28 13:26 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-05-28 13:26 UTC (permalink / raw)
  To: Mans Rullgard, Wim Van Sebroeck; +Cc: linux-watchdog, linux-kernel

On 5/28/19 2:09 AM, Mans Rullgard wrote:
> 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>

> ---
>   drivers/watchdog/gpio_wdt.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c
> index ea77cae03c9d..63792bb70213 100644
> --- a/drivers/watchdog/gpio_wdt.c
> +++ b/drivers/watchdog/gpio_wdt.c
> @@ -17,6 +17,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
>   
> @@ -155,6 +161,7 @@ static int gpio_wdt_probe(struct platform_device *pdev)
>   	priv->wdd.timeout	= SOFT_TIMEOUT_DEF;
>   
>   	watchdog_init_timeout(&priv->wdd, 0, &pdev->dev);
> +	watchdog_set_nowayout(&priv->wdd, nowayout);
>   
>   	watchdog_stop_on_reboot(&priv->wdd);
>   
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-28 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28  9:09 [PATCH] watchdog: gpio: add support for nowayout option Mans Rullgard
2019-05-28 13:26 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).