aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2023-01-17 11:47:51 +0000
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-01-24 12:10:18 +0530
commite59291c2ab16ebb555852835012a0b622d661d24 (patch)
tree6211817597b2a8176563c622367fecd44fe8e6ff
parent96de85dd408c7c424a0fb7f62c1c3935f8a769e5 (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.c3
-rw-r--r--sound/soc/codecs/wsa883x.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index 6c8b1db649b8..c9d7e4b098db 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 966ba4909204..cdf880a33421 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;
}