diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2023-08-08 18:47:00 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-08 23:34:02 +0200 |
commit | f5eb9503e80e70c22e3d3f73a5d3c149c132407f (patch) | |
tree | 4770baadba632c0abd33b396368ce5446dbba7d8 /sound/soc/codecs/cs35l56.c | |
parent | ASoC: cs35l56: Don't rely on GPIOD_OUT_LOW to set RESET initially low (diff) | |
download | linux-f5eb9503e80e70c22e3d3f73a5d3c149c132407f.tar.xz linux-f5eb9503e80e70c22e3d3f73a5d3c149c132407f.zip |
ASoC: cs35l56: Wait for control port ready during system-resume
The CS35L56 could be hard-reset during a system suspend-resume cycle,
either by the codec driver, in cs35l56_system_resume_early(), or by ACPI.
After a hard reset the driver must wait for the control port to be ready
(datasheet tIRS time) before attempting to access the CS35L56.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230808164702.21272-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l56.c')
-rw-r--r-- | sound/soc/codecs/cs35l56.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 9560059c867b..094bcbd0a174 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -952,6 +952,12 @@ int cs35l56_system_resume(struct device *dev) dev_dbg(dev, "system_resume\n"); + /* + * We might have done a hard reset or the CS35L56 was power-cycled + * so wait for control port to be ready. + */ + cs35l56_wait_control_port_ready(); + /* Undo pm_runtime_force_suspend() before re-enabling the irq */ ret = pm_runtime_force_resume(dev); if (cs35l56->base.irq) |