[PATCH v2 02/10] ASoC: wsa881x: Use new SoundWire enumeration helper
From: Charles Keepax
Date: Fri Jun 05 2026 - 04:51:49 EST
Now the new wait for SoundWire enumeration helper no longer depends on
unattach_request it can be used for code that also doesn't check this
flag. Update the driver to use the new core helper.
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---
No change since v1.
sound/soc/codecs/wsa881x.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index d15fda648dada..5174614c3e837 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -1167,16 +1167,14 @@ static int wsa881x_runtime_resume(struct device *dev)
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct regmap *regmap = dev_get_regmap(dev, NULL);
struct wsa881x_priv *wsa881x = dev_get_drvdata(dev);
- unsigned long time;
+ int ret;
gpiod_direction_output(wsa881x->sd_n, 0);
- time = wait_for_completion_timeout(&slave->initialization_complete,
- msecs_to_jiffies(WSA881X_PROBE_TIMEOUT));
- if (!time) {
- dev_err(dev, "Initialization not complete, timed out\n");
+ ret = sdw_slave_wait_for_init(slave, WSA881X_PROBE_TIMEOUT);
+ if (ret) {
gpiod_direction_output(wsa881x->sd_n, 1);
- return -ETIMEDOUT;
+ return ret;
}
regcache_cache_only(regmap, false);
--
2.47.3