Message ID | 20250325-da9052-fixes-v2-1-bfac3f07b4a4@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Various fixes for the da9052 watchdog | expand |
On Tue, Mar 25, 2025 at 08:27:12AM +0100, Marcus Folkesson wrote: > Add nowayout module parameter for not stopping the > watchdog when userspae application quits. > > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 77039f2f0be54273df1666fe40c413b6c89285a1..a8ff1e6a7903f6f139c5bb60d7d92ca39077ee04 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -30,6 +30,12 @@ struct da9052_wdt_data { unsigned long jpast; }; +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) ")"); + static const struct { u8 reg_val; int time; /* Seconds */ @@ -172,6 +178,7 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt->ops = &da9052_wdt_ops; da9052_wdt->parent = dev; watchdog_set_drvdata(da9052_wdt, driver_data); + watchdog_set_nowayout(da9052_wdt, nowayout); if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR) da9052_wdt->bootstatus |= WDIOF_CARDRESET;
Add nowayout module parameter for not stopping the watchdog when userspae application quits. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> --- drivers/watchdog/da9052_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+)