Skip to content

Commit 776d14d

Browse files
marcusfolkessonWim Van Sebroeck
authored andcommitted
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 4856ebd commit 776d14d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/watchdog/da9052_wdt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ struct da9052_wdt_data {
3030
unsigned long jpast;
3131
};
3232

33+
static bool nowayout = WATCHDOG_NOWAYOUT;
34+
module_param(nowayout, bool, 0);
35+
MODULE_PARM_DESC(nowayout,
36+
"Watchdog cannot be stopped once started (default="
37+
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
38+
3339
static const struct {
3440
u8 reg_val;
3541
int time; /* Seconds */
@@ -172,6 +178,7 @@ static int da9052_wdt_probe(struct platform_device *pdev)
172178
da9052_wdt->ops = &da9052_wdt_ops;
173179
da9052_wdt->parent = dev;
174180
watchdog_set_drvdata(da9052_wdt, driver_data);
181+
watchdog_set_nowayout(da9052_wdt, nowayout);
175182

176183
if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR)
177184
da9052_wdt->bootstatus |= WDIOF_CARDRESET;

0 commit comments

Comments
 (0)