mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
ASoC: wcd938x: 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-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ec1028e3f0
commit
d6fc2c7051
|
|
@ -3016,18 +3016,13 @@ static int wcd938x_irq_init(struct wcd938x_priv *wcd, struct device *dev)
|
|||
static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
|
||||
{
|
||||
struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
|
||||
struct sdw_slave *tx_sdw_dev = wcd938x->tx_sdw_dev;
|
||||
struct device *dev = component->dev;
|
||||
unsigned long time_left;
|
||||
unsigned int variant;
|
||||
int ret, i;
|
||||
|
||||
time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete,
|
||||
msecs_to_jiffies(2000));
|
||||
if (!time_left) {
|
||||
dev_err(dev, "soundwire device init timeout\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
ret = sdw_slave_wait_for_init(wcd938x->tx_sdw_dev, 2000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
snd_soc_component_init_regmap(component, wcd938x->regmap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user