diff options
author | Stefan Christ <s.christ@phytec.de> | 2016-07-06 08:40:11 (GMT) |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2016-07-17 19:02:42 (GMT) |
commit | a74cab40b5dc51b5ed042add1c5d2f5e9a1964bc (patch) | |
tree | 608d84b22edb0e97befa47185f216522e5508928 /drivers/watchdog/da9063_wdt.c | |
parent | 5a2d3de1960260f34da84ac27bdc1345b541f2e8 (diff) | |
download | linux-a74cab40b5dc51b5ed042add1c5d2f5e9a1964bc.tar.xz |
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>
Diffstat (limited to 'drivers/watchdog/da9063_wdt.c')
-rw-r--r-- | drivers/watchdog/da9063_wdt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c index a100f64..5d6b4e5 100644 --- a/drivers/watchdog/da9063_wdt.c +++ b/drivers/watchdog/da9063_wdt.c @@ -34,6 +34,7 @@ static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 }; #define DA9063_WDT_MIN_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MIN] #define DA9063_WDT_MAX_TIMEOUT wdt_timeout[DA9063_TWDSCALE_MAX] #define DA9063_WDG_TIMEOUT wdt_timeout[3] +#define DA9063_RESET_PROTECTION_MS 256 struct da9063_watchdog { struct da9063 *da9063; @@ -171,6 +172,7 @@ static int da9063_wdt_probe(struct platform_device *pdev) wdt->wdtdev.ops = &da9063_watchdog_ops; wdt->wdtdev.min_timeout = DA9063_WDT_MIN_TIMEOUT; wdt->wdtdev.max_timeout = DA9063_WDT_MAX_TIMEOUT; + wdt->wdtdev.min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS; wdt->wdtdev.timeout = DA9063_WDG_TIMEOUT; wdt->wdtdev.parent = &pdev->dev; |