public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.0 01/13] ASoC: fsl_micfil: explicitly clear software reset bit
@ 2022-12-06  9:49 Sasha Levin
  2022-12-06  9:49 ` [PATCH AUTOSEL 6.0 02/13] ASoC: fsl_micfil: explicitly clear CHnF flags Sasha Levin
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Sasha Levin @ 2022-12-06  9:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Shengjiu Wang, Mark Brown, Sasha Levin, shengjiu.wang, Xiubo.Lee,
	lgirdwood, perex, tiwai, alsa-devel, linuxppc-dev

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

[ Upstream commit 292709b9cf3ba470af94b62c9bb60284cc581b79 ]

SRES is self-cleared bit, but REG_MICFIL_CTRL1 is defined as
non volatile register, it still remain in regmap cache after set,
then every update of REG_MICFIL_CTRL1, software reset happens.
to avoid this, clear it explicitly.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1651925654-32060-1-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 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 79ef4e269bc9..8aa6871e0d42 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -194,6 +194,17 @@ static int fsl_micfil_reset(struct device *dev)
 	if (ret)
 		return ret;
 
+	/*
+	 * SRES is self-cleared bit, but REG_MICFIL_CTRL1 is defined
+	 * as non-volatile register, so SRES still remain in regmap
+	 * cache after set, that every update of REG_MICFIL_CTRL1,
+	 * software reset happens. so clear it explicitly.
+	 */
+	ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1,
+				MICFIL_CTRL1_SRES);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-12-07  3:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH AUTOSEL 6.0 02/13] ASoC: fsl_micfil: explicitly clear CHnF flags Sasha Levin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox