Skip to content

Commit 292709b

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_micfil: explicitly clear software reset bit
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a962890 commit 292709b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sound/soc/fsl/fsl_micfil.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ static int fsl_micfil_reset(struct device *dev)
191191
return ret;
192192
}
193193

194+
/*
195+
* SRES is self-cleared bit, but REG_MICFIL_CTRL1 is defined
196+
* as non-volatile register, so SRES still remain in regmap
197+
* cache after set, that every update of REG_MICFIL_CTRL1,
198+
* software reset happens. so clear it explicitly.
199+
*/
200+
ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1,
201+
MICFIL_CTRL1_SRES);
202+
if (ret)
203+
return ret;
204+
194205
return 0;
195206
}
196207

0 commit comments

Comments
 (0)