]>
Commit | Line | Data |
---|---|---|
375caec0 GKH |
1 | From d3030d11961a8c103cf07aed59905276ddfc06c2 Mon Sep 17 00:00:00 2001 |
2 | From: Mark Brown <broonie@kernel.org> | |
3 | Date: Wed, 18 May 2016 18:30:39 +0100 | |
4 | Subject: ASoC: ak4642: Enable cache usage to fix crashes on resume | |
5 | ||
6 | From: Mark Brown <broonie@kernel.org> | |
7 | ||
8 | commit d3030d11961a8c103cf07aed59905276ddfc06c2 upstream. | |
9 | ||
10 | The ak4642 driver is using a regmap cache sync to restore the | |
11 | configuration of the chip on resume but (as Peter observed) does not | |
12 | actually define a register cache which means that the resume is never | |
13 | going to work and we trigger asserts in regmap. Fix this by enabling | |
14 | caching. | |
15 | ||
16 | Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> | |
17 | Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com> | |
18 | Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> | |
19 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
21 | ||
22 | --- | |
23 | sound/soc/codecs/ak4642.c | 3 +++ | |
24 | 1 file changed, 3 insertions(+) | |
25 | ||
26 | --- a/sound/soc/codecs/ak4642.c | |
27 | +++ b/sound/soc/codecs/ak4642.c | |
28 | @@ -560,6 +560,7 @@ static const struct regmap_config ak4642 | |
29 | .max_register = FIL1_3, | |
30 | .reg_defaults = ak4642_reg, | |
31 | .num_reg_defaults = NUM_AK4642_REG_DEFAULTS, | |
32 | + .cache_type = REGCACHE_RBTREE, | |
33 | }; | |
34 | ||
35 | static const struct regmap_config ak4643_regmap = { | |
36 | @@ -568,6 +569,7 @@ static const struct regmap_config ak4643 | |
37 | .max_register = SPK_MS, | |
38 | .reg_defaults = ak4643_reg, | |
39 | .num_reg_defaults = ARRAY_SIZE(ak4643_reg), | |
40 | + .cache_type = REGCACHE_RBTREE, | |
41 | }; | |
42 | ||
43 | static const struct regmap_config ak4648_regmap = { | |
44 | @@ -576,6 +578,7 @@ static const struct regmap_config ak4648 | |
45 | .max_register = EQ_FBEQE, | |
46 | .reg_defaults = ak4648_reg, | |
47 | .num_reg_defaults = ARRAY_SIZE(ak4648_reg), | |
48 | + .cache_type = REGCACHE_RBTREE, | |
49 | }; | |
50 | ||
51 | static const struct ak4642_drvdata ak4642_drvdata = { |