summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2022-02-23 20:59:07 +0300
committerLee Jones <lee.jones@linaro.org>2022-03-07 16:54:58 +0300
commit3f6f1f1f9f12c16934304ceca342b7ba83639da9 (patch)
treeab11d821fcdefaddbc3b90983525fa9707dd0168 /drivers/watchdog
parent254099d8fafcd80e11a3246f6ff62af816a2b566 (diff)
downloadlinux-3f6f1f1f9f12c16934304ceca342b7ba83639da9.tar.xz
watchdog: max77620: Add comment to clarify set_timeout procedure
Clarify why we need to ping the watchdog before changing the timeout by quoting the MAX77714 datasheet. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/max77620_wdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/watchdog/max77620_wdt.c b/drivers/watchdog/max77620_wdt.c
index cd321c7e0d59..b76ad6ba0915 100644
--- a/drivers/watchdog/max77620_wdt.c
+++ b/drivers/watchdog/max77620_wdt.c
@@ -123,6 +123,11 @@ static int max77620_wdt_set_timeout(struct watchdog_device *wdt_dev,
break;
}
+ /*
+ * "If the value of TWD needs to be changed, clear the system
+ * watchdog timer first [...], then change the value of TWD."
+ * (MAX77714 datasheet but applies to MAX77620 too)
+ */
ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl3,
wdt->drv_data->wdtc_mask, 0x1);
if (ret < 0)