Skip to contentSkip to conversation

ASoC: wm8962: Turn on regcache_cache_only before disabling regulator

PATCH Applied Nicolin Chen 2 participants 2 messages Nov 14, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm8962: Turn on regcache_cache_only before disabling regulator

It's safer to turn on regcache_cache_only before disabling regulator since the driver will turn off the regcache_cache_only after enabling regulator.

If we remain cache_only false, some command like 'amixer cset' would get failure if being run before wm8962_resume().

---
 sound/soc/codecs/wm8962.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/wm8962.c +2 -0
index 2bf9ee7..1741493 100644
@@ -3720,6 +3720,8 @@ static int wm8962_i2c_probe(struct i2c_client *i2c,
 	if (ret < 0)
 		goto err_enable;
 
+	regcache_cache_only(wm8962->regmap, true);
+
 	/* The drivers should power up as needed */
 	regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies);
 
Signature · 1 line
1.8.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Nicolin Chen

It's safer to turn on regcache_cache_only before disabling regulator since the driver will turn off the regcache_cache_only after enabling regulator.

Applied, thanks.