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

watchdog: da9063_wdt: don't trigger watchdog too fast

Triggering the watchdog faster than T_WDMIN=256ms leads to resets of the
DA9063 chip. The datasheet says that the watchdog must only be triggered
in the timeframe T_WDMIN to T_WDMAX. The T_WDMAX is configured in the
driver.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Stefan Christ and committed by
Wim Van Sebroeck
a74cab40 5a2d3de1

+2
+2
drivers/watchdog/da9063_wdt.c
··· 34 34 #define DA9063_WDT_MIN_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MIN] 35 35 #define DA9063_WDT_MAX_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MAX] 36 36 #define DA9063_WDG_TIMEOUT wdt_timeout[3] 37 + #define DA9063_RESET_PROTECTION_MS 256 37 38 38 39 struct da9063_watchdog { 39 40 struct da9063 *da9063; ··· 172 171 wdt->wdtdev.ops = &da9063_watchdog_ops; 173 172 wdt->wdtdev.min_timeout = DA9063_WDT_MIN_TIMEOUT; 174 173 wdt->wdtdev.max_timeout = DA9063_WDT_MAX_TIMEOUT; 174 + wdt->wdtdev.min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS; 175 175 wdt->wdtdev.timeout = DA9063_WDG_TIMEOUT; 176 176 wdt->wdtdev.parent = &pdev->dev; 177 177