From: Stefan Christ <s.christ@xxxxxxxxx> In the default fuse configuration the watchdog poweroffs the system instead of resetting it on a watchdog timeout. This patch changes the behavior. Now the board is reseted and reboots. Note: This patch requires that the config register CONFIG_I is configured as writable in the da9062 multi function device. Signed-off-by: Stefan Christ <s.christ@xxxxxxxxx> Signed-off-by: Christian Hemp <c.hemp@xxxxxxxxx> --- drivers/watchdog/da9062_wdt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index 4349a02215489..b95719b349e5c 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -112,6 +112,20 @@ static int da9062_wdt_start(struct watchdog_device *wdd) unsigned int selector; int ret; + /* + * Use da9062's SHUTDOWN mode instead of POWERDOWN for watchdog reset. + * On timeout the PMIC should reset the system, not powering it + * off. + */ + ret = regmap_update_bits(wdt->hw->regmap, + DA9062AA_CONFIG_I, + DA9062AA_WATCHDOG_SD_MASK, + DA9062AA_WATCHDOG_SD_MASK); + if (ret) + dev_err(wdt->hw->dev, + "failed to set wdt reset mode. Expect poweroff on watchdog reset: %d\n", + ret); + selector = da9062_wdt_timeout_to_sel(wdt->wdtdev.timeout); ret = da9062_wdt_update_timeout_register(wdt, selector); if (ret) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html