[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201207125338.119397-2-paul@crapouillou.net>
Date: Mon, 7 Dec 2020 12:53:34 +0000
From: Paul Cercueil <paul@...pouillou.net>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: od@...c.me, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org,
Christophe Branchereau <cbranchereau@...il.com>,
Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH 2/5] ASoC: codecs/jz4770: Reset interrupt flags in bias PREPARE
From: Christophe Branchereau <cbranchereau@...il.com>
In case a poll for RUP times out, we might be left with some IRQ flags
that should be cleared before the next power on.
Signed-off-by: Christophe Branchereau <cbranchereau@...il.com>
Signed-off-by: Paul Cercueil <paul@...pouillou.net>
---
sound/soc/codecs/jz4770.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c
index c6b2043f31a9..002f2300e750 100644
--- a/sound/soc/codecs/jz4770.c
+++ b/sound/soc/codecs/jz4770.c
@@ -190,6 +190,9 @@ static int jz4770_codec_set_bias_level(struct snd_soc_component *codec,
switch (level) {
case SND_SOC_BIAS_PREPARE:
+ /* Reset all interrupt flags. */
+ regmap_write(regmap, JZ4770_CODEC_REG_IFR, REG_IFR_ALL_MASK);
+
regmap_clear_bits(regmap, JZ4770_CODEC_REG_CR_VIC,
REG_CR_VIC_SB);
msleep(250);
@@ -642,9 +645,6 @@ static void jz4770_codec_codec_init_regs(struct snd_soc_component *codec)
/* Send collected updates. */
regcache_cache_only(regmap, false);
regcache_sync(regmap);
-
- /* Reset all interrupt flags. */
- regmap_write(regmap, JZ4770_CODEC_REG_IFR, REG_IFR_ALL_MASK);
}
static int jz4770_codec_codec_probe(struct snd_soc_component *codec)
--
2.29.2
Powered by blists - more mailing lists