lkml.org 
[lkml]   [2021]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 2/2] watchdog: wdat: add start_enable global parameter
Date
The "start_enable" global parameter, managed in watchdog_core.c,
forces the driver to start the watchdog countdown in the same moment of the
module insertion.
The driver also updates the watchdog status, setting the WDOG_HW_RUNNING
flag, to enable the watchdog ping feature managed by the watchdog_core
itself.

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
---
drivers/watchdog/wdat_wdt.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index cec7917790e5..7304a335227f 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -437,6 +437,8 @@ static int wdat_wdt_probe(struct platform_device *pdev)
}

wdat_wdt_boot_status(wdat);
+ if (watchdog_global_param_start_enabled())
+ wdat_wdt_start(&wdat->wdd);
wdat_wdt_set_running(wdat);

ret = wdat_wdt_enable_reboot(wdat);
--
2.25.1
\
 
 \ /
  Last update: 2021-03-08 12:23    [W:0.166 / U:2.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site