提交 d3030d11 编写于 作者: M Mark Brown

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

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: NGeert Uytterhoeven <geert@linux-m68k.org>
Reported-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
上级 29cf67b9
...@@ -560,6 +560,7 @@ static const struct regmap_config ak4642_regmap = { ...@@ -560,6 +560,7 @@ static const struct regmap_config ak4642_regmap = {
.max_register = FIL1_3, .max_register = FIL1_3,
.reg_defaults = ak4642_reg, .reg_defaults = ak4642_reg,
.num_reg_defaults = NUM_AK4642_REG_DEFAULTS, .num_reg_defaults = NUM_AK4642_REG_DEFAULTS,
.cache_type = REGCACHE_RBTREE,
}; };
static const struct regmap_config ak4643_regmap = { static const struct regmap_config ak4643_regmap = {
...@@ -568,6 +569,7 @@ static const struct regmap_config ak4643_regmap = { ...@@ -568,6 +569,7 @@ static const struct regmap_config ak4643_regmap = {
.max_register = SPK_MS, .max_register = SPK_MS,
.reg_defaults = ak4643_reg, .reg_defaults = ak4643_reg,
.num_reg_defaults = ARRAY_SIZE(ak4643_reg), .num_reg_defaults = ARRAY_SIZE(ak4643_reg),
.cache_type = REGCACHE_RBTREE,
}; };
static const struct regmap_config ak4648_regmap = { static const struct regmap_config ak4648_regmap = {
...@@ -576,6 +578,7 @@ static const struct regmap_config ak4648_regmap = { ...@@ -576,6 +578,7 @@ static const struct regmap_config ak4648_regmap = {
.max_register = EQ_FBEQE, .max_register = EQ_FBEQE,
.reg_defaults = ak4648_reg, .reg_defaults = ak4648_reg,
.num_reg_defaults = ARRAY_SIZE(ak4648_reg), .num_reg_defaults = ARRAY_SIZE(ak4648_reg),
.cache_type = REGCACHE_RBTREE,
}; };
static const struct ak4642_drvdata ak4642_drvdata = { static const struct ak4642_drvdata ak4642_drvdata = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册