summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2025-03-26 09:29:48 +0100
committerWim Van Sebroeck <wim@linux-watchdog.org>2025-05-24 16:57:50 +0200
commit776d14d201ae8b266208e0eae6510692bc58d9f2 (patch)
tree3ccc12432c6c1872faf8d4fadd35f84e24cd4f2a
parent4856ebd997159f198e3177e515bda01143727463 (diff)
watchdog: da9052_wdt: add support for nowayout
Add nowayout module parameter for not stopping the watchdog when userspace application quits. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-1-a38a560fef0e@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
-rw-r--r--drivers/watchdog/da9052_wdt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
index 77039f2f0be5..a8ff1e6a7903 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;