public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Use watchdog_stop_on_unregister() to stop sp805 watchdog when unregistering it
@ 2022-04-14  5:42 Eliav Farber
  2022-04-14  5:42 ` [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove Eliav Farber
  0 siblings, 1 reply; 3+ messages in thread
From: Eliav Farber @ 2022-04-14  5:42 UTC (permalink / raw)
  To: wim, linux, linux-watchdog, linux-kernel
  Cc: ronenk, talel, hhhawa, jonnyc, hanochu, farbere, dwmw

Use watchdog_stop_on_unregister() in probe instead of calling wdt_disable()
from the remove function.

Eliav Farber (1):
  watchdog: sp805: disable watchdog on remove

 drivers/watchdog/sp805_wdt.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.32.0


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

* [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove
  2022-04-14  5:42 [PATCH v2 0/1] Use watchdog_stop_on_unregister() to stop sp805 watchdog when unregistering it Eliav Farber
@ 2022-04-14  5:42 ` Eliav Farber
  2022-04-26 20:36   ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Eliav Farber @ 2022-04-14  5:42 UTC (permalink / raw)
  To: wim, linux, linux-watchdog, linux-kernel
  Cc: ronenk, talel, hhhawa, jonnyc, hanochu, farbere, dwmw

Disable the watchdog if it is active while removing the module.
It is necessary in order to prevent a reset in case watchdog
hw was running before the removal.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/watchdog/sp805_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index d8876fba686d..69a6182c2dfe 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -273,6 +273,7 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
 	watchdog_set_nowayout(&wdt->wdd, nowayout);
 	watchdog_set_drvdata(&wdt->wdd, wdt);
 	watchdog_set_restart_priority(&wdt->wdd, 128);
+	watchdog_stop_on_unregister(&wdt->wdd);
 
 	/*
 	 * If 'timeout-sec' devicetree property is specified, use that.
-- 
2.32.0


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

* Re: [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove
  2022-04-14  5:42 ` [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove Eliav Farber
@ 2022-04-26 20:36   ` Guenter Roeck
  0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2022-04-26 20:36 UTC (permalink / raw)
  To: Eliav Farber, wim, linux-watchdog, linux-kernel
  Cc: ronenk, talel, hhhawa, jonnyc, hanochu, dwmw

On 4/13/22 22:42, Eliav Farber wrote:
> Disable the watchdog if it is active while removing the module.
> It is necessary in order to prevent a reset in case watchdog
> hw was running before the removal.
> 
> Signed-off-by: Eliav Farber <farbere@amazon.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Note that sending an introduction is not necessary for individual patches.

Guenter

> ---
>   drivers/watchdog/sp805_wdt.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index d8876fba686d..69a6182c2dfe 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -273,6 +273,7 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
>   	watchdog_set_nowayout(&wdt->wdd, nowayout);
>   	watchdog_set_drvdata(&wdt->wdd, wdt);
>   	watchdog_set_restart_priority(&wdt->wdd, 128);
> +	watchdog_stop_on_unregister(&wdt->wdd);
>   
>   	/*
>   	 * If 'timeout-sec' devicetree property is specified, use that.


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

end of thread, other threads:[~2022-04-26 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-14  5:42 [PATCH v2 0/1] Use watchdog_stop_on_unregister() to stop sp805 watchdog when unregistering it Eliav Farber
2022-04-14  5:42 ` [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove Eliav Farber
2022-04-26 20:36   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox