Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: da9052_wdt: use timeout value from external inputs

Introduce the `timeout` module parameter and pass it to
watchdog_init_timeout(). If the parameter is not set or contains an
invalid value, fallback on the `timeout-secs` devicetree property value.

If none of the above is valid, go for the old default value.

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-2-a38a560fef0e@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Marcus Folkesson and committed by
Wim Van Sebroeck
ec90349a 776d14d2

+7
+7
drivers/watchdog/da9052_wdt.c
··· 36 36 "Watchdog cannot be stopped once started (default=" 37 37 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 38 38 39 + static int timeout; 40 + module_param(timeout, int, 0); 41 + MODULE_PARM_DESC(timeout, 42 + "Watchdog timeout in seconds. (default = " 43 + __MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")"); 44 + 39 45 static const struct { 40 46 u8 reg_val; 41 47 int time; /* Seconds */ ··· 184 178 da9052_wdt->ops = &da9052_wdt_ops; 185 179 da9052_wdt->parent = dev; 186 180 watchdog_set_drvdata(da9052_wdt, driver_data); 181 + watchdog_init_timeout(da9052_wdt, timeout, dev); 187 182 watchdog_set_nowayout(da9052_wdt, nowayout); 188 183 189 184 if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR)