Skip to content

Commit f061e2b

Browse files
committed
ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
The WM8904_ADC_TEST_0 register is modified as part of updating the OSR controls but does not have a cache default, leading to errors when we try to modify these controls in cache only mode with no prior read: wm8904 3-001a: ASoC: error at snd_soc_component_update_bits on wm8904.3-001a for register: [0x000000c6] -16 Add a read of the register to probe() to fill the cache and avoid both the error messages and the misconfiguration of the chip which will result. Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230723-asoc-fix-wm8904-adc-test-read-v1-1-2cdf2edd83fd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent c918008 commit f061e2b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/codecs/wm8904.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,9 @@ static int wm8904_i2c_probe(struct i2c_client *i2c)
23082308
regmap_update_bits(wm8904->regmap, WM8904_BIAS_CONTROL_0,
23092309
WM8904_POBCTRL, 0);
23102310

2311+
/* Fill the cache for the ADC test register */
2312+
regmap_read(wm8904->regmap, WM8904_ADC_TEST_0, &val);
2313+
23112314
/* Can leave the device powered off until we need it */
23122315
regcache_cache_only(wm8904->regmap, true);
23132316
regulator_bulk_disable(ARRAY_SIZE(wm8904->supplies), wm8904->supplies);

0 commit comments

Comments
 (0)