From b82ead26703f2363e1848bb3ad35eb342207504d Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Tue, 23 Jun 2020 13:20:09 +0800 Subject: [PATCH] ASoC: codec: max98373-sdw: fix a amixer error when codec is suspended If codec is suspended, a error of Device or resource busy occurs when executing amixer. Amixer accesses AMP_PATH_GAIN which is a volatile register and the regmap is set to cache_only when codec is suspended, so regmap can't get its data from regmap cache and return -EBUSY. Actually this register can be set by user and remain unchanged, so we can get its value from regmap cache. This patch removes volatile attribute of this register and initializes it to let regmap cache work. Signed-off-by: Rander Wang Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373-sdw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 10d24b678b29f8..93e7163d9c6b3e 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -208,7 +208,6 @@ static bool max98373_readable_register(struct device *dev, unsigned int reg) static bool max98373_volatile_reg(struct device *dev, unsigned int reg) { switch (reg) { - case MAX98373_R203E_AMP_PATH_GAIN: case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK: case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK: case MAX98373_R20B6_BDE_CUR_STATE_READBACK: