mfd: madera: Add reset as part of resume
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 27 Oct 2020 09:41:31 +0000 (09:41 +0000)
committerLee Jones <lee.jones@linaro.org>
Thu, 19 Nov 2020 08:34:22 +0000 (08:34 +0000)
commit1cd7b935d298c6497581f86c3f74d2d2be54f294
tree20e4e5b114a7e00ba45f53b70f3c19cbd55739b0
parent21ca0f5b5c04f10c12aa977b04e6bbdbed2196ca
mfd: madera: Add reset as part of resume

The DCVDD supply does not always power down when the CODEC enters
suspend, for example shared regulators or always-on regulators. In
these cases if a register is written back to the default value whilst
the CODEC is in suspend that register will retain the previous value.
As DCVDD never powered down, the register retains its old value and
as the cache sync only synchronises registers that differ from the
default the new value is never written out.

Ensure the registers are in the expected state after suspend by always
resetting the CODEC on resume. This also has the benefit of being
recommended by the datasheet for DCVDD supplies that take longer than
2mS to rise.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/madera-core.c