Commit 50c7a0ef authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

ASoC: wm8940: Enable cache usage to fix crashes on resume

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 d3030d11 ("ASoC: ak4642: Enable cache usage to
fix crashes on resume") by Mark Brown <broonie@kernel.org>.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a695a90
...@@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = { ...@@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = {
.max_register = WM8940_MONOMIX, .max_register = WM8940_MONOMIX,
.reg_defaults = wm8940_reg_defaults, .reg_defaults = wm8940_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults), .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults),
.cache_type = REGCACHE_RBTREE,
.readable_reg = wm8940_readable_register, .readable_reg = wm8940_readable_register,
.volatile_reg = wm8940_volatile_register, .volatile_reg = wm8940_volatile_register,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment