diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-06-08 11:27:10 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-11 20:46:52 +0100 |
| commit | ec1028e3f0771980e08ee643923119b81a4e4cda (patch) | |
| tree | edfe3f2af9aff7947849ff22c20ea9dee275af85 /sound | |
| parent | ae636c93299dde6effcc84a0ba832a053ec4cb60 (diff) | |
ASoC: wcd937x: Use new SoundWire enumeration helper
Now the new wait for SoundWire enumeration helper no longer depends on
unattach_request it is safe to use from probe time. Update the driver
to use the new core helper.
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260608102714.2503120-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/codecs/wcd937x.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index 72a53f95d688..e0169e783ee9 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -2499,18 +2499,13 @@ static int wcd937x_soc_codec_probe(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); - struct sdw_slave *tx_sdw_dev = wcd937x->tx_sdw_dev; struct device *dev = component->dev; - unsigned long time_left; int i, ret; u32 chipid; - time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete, - msecs_to_jiffies(5000)); - if (!time_left) { - dev_err(dev, "soundwire device init timeout\n"); - return -ETIMEDOUT; - } + ret = sdw_slave_wait_for_init(wcd937x->tx_sdw_dev, 5000); + if (ret) + return ret; snd_soc_component_init_regmap(component, wcd937x->regmap); ret = pm_runtime_resume_and_get(dev); |
