Commit 8f59f6e7 authored by Mark Brown's avatar Mark Brown Committed by Kamal Mostafa

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

commit d3030d11 upstream.

The ak4642 driver is using a regmap cache sync to restore the
configuration of the chip on resume but (as Peter observed) does not
actually define a register cache which means that the resume is never
going to work and we trigger asserts in regmap.  Fix this by enabling
caching.
Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reported-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
[ kamal: backport to 4.2-stable: no separate ak4643_regmap ]
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 166aebcb
......@@ -508,6 +508,7 @@ static const struct regmap_config ak4642_regmap = {
.max_register = ARRAY_SIZE(ak4642_reg) + 1,
.reg_defaults = ak4642_reg,
.num_reg_defaults = ARRAY_SIZE(ak4642_reg),
.cache_type = REGCACHE_RBTREE,
};
static const struct regmap_config ak4648_regmap = {
......@@ -516,6 +517,7 @@ static const struct regmap_config ak4648_regmap = {
.max_register = ARRAY_SIZE(ak4648_reg) + 1,
.reg_defaults = ak4648_reg,
.num_reg_defaults = ARRAY_SIZE(ak4648_reg),
.cache_type = REGCACHE_RBTREE,
};
static const struct ak4642_drvdata ak4642_drvdata = {
......
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