diff mbox

[3/3] ASoC: wm8940: Enable cache usage to fix crashes on resume

Message ID 1466080472-9817-4-git-send-email-geert+renesas@glider.be (mailing list archive)
State Accepted
Commit 50c7a0ef2d97e56c7ce2f1ea5fe1d8e25aadc1bb
Headers show

Commit Message

Geert Uytterhoeven June 16, 2016, 12:34 p.m. UTC
The wm8940 driver is using a regmap cache sync to restore the
configuration of the chip when switching from OFF to STANDBY, but does
not actually define a register cache which means that the restore is
never going to work and we trigger asserts in regmap.  Fix this by
enabling caching.

Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to
fix crashes on resume") by Mark Brown <broonie@kernel.org>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested.
---
 sound/soc/codecs/wm8940.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Charles Keepax June 16, 2016, 3:16 p.m. UTC | #1
On Thu, Jun 16, 2016 at 02:34:32PM +0200, Geert Uytterhoeven wrote:
> The wm8940 driver is using a regmap cache sync to restore the
> configuration of the chip when switching from OFF to STANDBY, but does
> not actually define a register cache which means that the restore is
> never going to work and we trigger asserts in regmap.  Fix this by
> enabling caching.
> 
> Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to
> fix crashes on resume") by Mark Brown <broonie@kernel.org>.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles
diff mbox

Patch

diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index f6f9395ea38ef88b..1c600819f7689b45 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -743,6 +743,7 @@  static const struct regmap_config wm8940_regmap = {
 	.max_register = WM8940_MONOMIX,
 	.reg_defaults = wm8940_reg_defaults,
 	.num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults),
+	.cache_type = REGCACHE_RBTREE,
 
 	.readable_reg = wm8940_readable_register,
 	.volatile_reg = wm8940_volatile_register,