summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMartin Povišer <povik+lin@cutebit.org>2022-09-19 20:34:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-05 11:38:41 +0300
commit359e73edd3be51d192923a90f2f2d44dd6a7c131 (patch)
tree46cd20741a3a26139c68ffec42baa93c102eec52 /sound
parent8884a192f95e6f845d11d039b1bc0ca0c368737f (diff)
downloadlinux-359e73edd3be51d192923a90f2f2d44dd6a7c131.tar.xz
ASoC: tas2770: Reinit regcache on reset
[ Upstream commit 0a0342ede303fc420f3a388e1ae82da3ae8ff6bd ] On probe of the ASoC component, the device is reset but the regcache is retained. This means the regcache gets out of sync if the codec is rebound to a sound card for a second time. Fix it by reinitializing the regcache to defaults after the device is reset. Fixes: b0bcbe615756 ("ASoC: tas2770: Fix calling reset in probe") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220919173453.84292-1-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tas2770.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index 024ec68e8d35..171bbcc919d5 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -495,6 +495,8 @@ static struct snd_soc_dai_driver tas2770_dai_driver[] = {
},
};
+static const struct regmap_config tas2770_i2c_regmap;
+
static int tas2770_codec_probe(struct snd_soc_component *component)
{
struct tas2770_priv *tas2770 =
@@ -508,6 +510,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
}
tas2770_reset(tas2770);
+ regmap_reinit_cache(tas2770->regmap, &tas2770_i2c_regmap);
return 0;
}