public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Shengjiu Wang <shengjiu.wang@nxp.com>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
	shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com,
	lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH AUTOSEL 6.0 02/13] ASoC: fsl_micfil: explicitly clear CHnF flags
Date: Tue,  6 Dec 2022 04:49:05 -0500	[thread overview]
Message-ID: <20221206094916.987259-2-sashal@kernel.org> (raw)
In-Reply-To: <20221206094916.987259-1-sashal@kernel.org>

From: Shengjiu Wang <shengjiu.wang@nxp.com>

[ Upstream commit b776c4a4618ec1b5219d494c423dc142f23c4e8f ]

There may be failure when start 1 channel recording after
8 channels recording. The reason is that the CHnF
flags are not cleared successfully by software reset.

This issue is triggerred by the change of clearing
software reset bit.

CHnF flags are write 1 clear bits. Clear them by force
write.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1651925654-32060-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 8aa6871e0d42..4b86ef82fd93 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -205,6 +205,14 @@ static int fsl_micfil_reset(struct device *dev)
 	if (ret)
 		return ret;
 
+	/*
+	 * Set SRES should clear CHnF flags, But even add delay here
+	 * the CHnF may not be cleared sometimes, so clear CHnF explicitly.
+	 */
+	ret = regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, 0xFF, 0xFF);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
-- 
2.35.1


  reply	other threads:[~2022-12-06  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  9:49 [PATCH AUTOSEL 6.0 01/13] ASoC: fsl_micfil: explicitly clear software reset bit Sasha Levin
2022-12-06  9:49 ` Sasha Levin [this message]
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 03/13] ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx() Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 04/13] libbpf: Use page size as max_entries when probing ring buffer map Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 05/13] pinctrl: meditatek: Startup with the IRQs disabled Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 06/13] can: sja1000: fix size of OCR_MODE_MASK define Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 07/13] can: mcba_usb: Fix termination command argument Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 08/13] net: fec: don't reset irq coalesce settings to defaults on "ip link up" Sasha Levin
2022-12-06  9:55   ` Rasmus Villemoes
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 09/13] net: loopback: use NET_NAME_PREDICTABLE for name_assign_type Sasha Levin
2022-12-06 19:49   ` Jakub Kicinski
2022-12-07  2:20     ` Sasha Levin
2022-12-07  2:49       ` Jakub Kicinski
2022-12-07  3:56         ` Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 10/13] ASoC: cs42l51: Correct PGA Volume minimum value Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 11/13] perf: Fix perf_pending_task() UaF Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 12/13] nvme-pci: clear the prp2 field when not used Sasha Levin
2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 13/13] v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206094916.987259-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@gmail.com \
    --cc=shengjiu.wang@nxp.com \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox