mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
watchdog: da9062: Disable and wait before changing timeout
The DA9062 watchdog occasionally enters error condition and resets the system if the timeout is changed quickly after the timer was enabled. The method of disabling and waiting for > 150 µs before setting the new timeout is taken from the DA9052 driver. Signed-off-by: Michael Grzeschik <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
parent
540f635192
commit
f31b2a9bde
1 changed files with 7 additions and 0 deletions
|
|
@ -100,6 +100,13 @@ static int da9062_wdt_update_timeout_register(struct da9062_watchdog *wdt,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
regmap_update_bits(chip->regmap,
|
||||
DA9062AA_CONTROL_D,
|
||||
DA9062AA_TWDSCALE_MASK,
|
||||
DA9062_TWDSCALE_DISABLE);
|
||||
|
||||
usleep_range(150, 300);
|
||||
|
||||
return regmap_update_bits(chip->regmap,
|
||||
DA9062AA_CONTROL_D,
|
||||
DA9062AA_TWDSCALE_MASK,
|
||||
|
|
|
|||
Loading…
Reference in a new issue