watchdog: da9062: Initialize timeout during probe
authorStefan Riedmueller <s.riedmueller@phytec.de>
Fri, 3 Apr 2020 13:07:26 +0000 (15:07 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 25 May 2020 06:55:43 +0000 (08:55 +0200)
commite8799ce85992defa341613c5c6f083fa412266f3
treeb5990e9fb4b638e6a13b75cdd41ac79e19e000d1
parentf249eef9e66e46065a42a0c164ecc3a40f52102a
watchdog: da9062: Initialize timeout during probe

During probe try to set the timeout from device tree and fall back to
either the pre-configured timeout set by e.g. the bootloader in case the
watchdog is already running or the default value.

If the watchdog is already running make sure to update the timeout and
tell the framework about the running state to make sure the watchdog is
handled correctly until user space takes over. Updating the timeout also
removes the need for an additional manual ping so we can remove that as
well.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200403130728.39260-1-s.riedmueller@phytec.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/da9062_wdt.c