ASoC: pm4125: 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-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Charles Keepax 2026-06-08 11:27:09 +01:00 committed by Mark Brown
parent 933feddee4
commit ae636c9329
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1309,17 +1309,12 @@ static int pm4125_irq_init(struct pm4125_priv *pm4125, struct device *dev)
static int pm4125_soc_codec_probe(struct snd_soc_component *component)
{
struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component);
struct sdw_slave *tx_sdw_dev = pm4125->tx_sdw_dev;
struct device *dev = component->dev;
unsigned long time_left;
int i, ret;
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(pm4125->tx_sdw_dev, 5000);
if (ret)
return ret;
snd_soc_component_init_regmap(component, pm4125->regmap);
ret = pm_runtime_resume_and_get(dev);