ASoC: cs42l42: Allow time for HP/ADC to power-up after enable
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Fri, 15 Oct 2021 13:36:15 +0000 (14:36 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 15 Oct 2021 15:14:19 +0000 (16:14 +0100)
commit4ae1d8f911d6fc20baefd5eb061bf6964fa22a32
treeadbd339865ca92dbb92bc0ed78cc5bb667f3e82a
parent3c211cb7db2905221f9f006aa66b8af17bfcd480
ASoC: cs42l42: Allow time for HP/ADC to power-up after enable

After enabling the HP or ADC by writing the corresponding PDN=0,
it takes around 20 milliseconds for it to power up and the midrail
supply to be stable. Add this wait into a DAPM widget callback.

If HP and ADC are both powering up in a DAPM sequence, there's no
need to do the wait twice. The widget will perform one wait in the
POST_PMU if there was a PRE_PMU for one or both.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211015133619.4698-13-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l42.h