]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: pm8916_wdt: Handle watchdog enabled by bootloader
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Wed, 29 Jun 2022 08:48:16 +0000 (10:48 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 23 Jul 2022 12:21:28 +0000 (14:21 +0200)
commitd45942508ac95487b4c9928bca8c090a526ab6f4
tree66a47e79aa646a9dc4878721c1486e14892da10e
parent2a60634192c5bb782a0d792edbac602d5cdf518c
watchdog: pm8916_wdt: Handle watchdog enabled by bootloader

The bootloader might already enable the watchdog to catch hangs
during the boot process. In that case the kernel needs to ping
the watchdog temporarily until userspace is fully started.

Add a check for this in the probe() function and set the WDOG_HW_RUNNING
flag to make the watchdog core handle this automatically.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220629084816.125515-4-stephan.gerhold@kernkonzept.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/pm8916_wdt.c