summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-11-24 13:19:02 +0000
committerMark Brown <broonie@kernel.org>2022-11-24 13:19:02 +0000
commit81cb291eaf56a2b4aebd2aeb4070d6f049da4343 (patch)
tree8c003f185ed7b344beae0ee6321a648b77fee2b1 /sound/soc/fsl
parentdb8f91d424fe0ea6db337aca8bc05908bbce1498 (diff)
parent19c5bda74dc45fee598a57600b550c9ea7662f10 (diff)
ASoC: Merge dropped fixes from v5.18
These fixes were queued for v5.18 but due to me changing my scripting they never actually got merged - pulling them up now.
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_micfil.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 79ef4e269bc9..4b86ef82fd93 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -194,6 +194,25 @@ 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;
+
+ /*
+ * 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;
}