diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-01-17 11:47:51 +0000 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-02-10 14:18:12 +0000 |
commit | 328003cc781deb8cd51641638ea5d493d513a58f (patch) | |
tree | 64bf62f29c93b412bd97ff757c73fb409cfb5a6c | |
parent | 3b3cbec8e0a69902d484f37fa6344237a43eb4ce (diff) |
ASoC: codecs: wsa: put regmap in cache only before enumeration
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r-- | sound/soc/codecs/wsa881x.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wsa883x.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index 6c8b1db649b89..c9d7e4b098db0 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -689,6 +689,8 @@ static void wsa881x_init(struct wsa881x_priv *wsa881x) { struct regmap *rm = wsa881x->regmap; unsigned int val = 0; + regcache_cache_only(wsa881x->regmap, false); + regcache_sync(wsa881x->regmap); regmap_read(rm, WSA881X_CHIP_ID1, &wsa881x->version); regmap_register_patch(wsa881x->regmap, wsa881x_rev_2_0, @@ -735,6 +737,7 @@ static int wsa881x_component_probe(struct snd_soc_component *comp) struct wsa881x_priv *wsa881x = snd_soc_component_get_drvdata(comp); snd_soc_component_init_regmap(comp, wsa881x->regmap); + regcache_cache_only(wsa881x->regmap, true); return 0; } diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index 966ba4909204a..cdf880a334217 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1008,6 +1008,9 @@ static void wsa883x_init(struct wsa883x_priv *wsa883x) struct regmap *regmap = wsa883x->regmap; int variant, version; + regcache_cache_only(wsa883x->regmap, false); + regcache_sync(wsa883x->regmap); + regmap_read(regmap, WSA883X_OTP_REG_0, &variant); wsa883x->variant = variant & WSA883X_ID_MASK; @@ -1171,6 +1174,7 @@ static int wsa883x_codec_probe(struct snd_soc_component *comp) struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(comp); snd_soc_component_init_regmap(comp, wsa883x->regmap); + regcache_cache_only(wsa883x->regmap, true); return 0; } |