diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-05-14 09:33:58 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-05-15 10:31:04 +0900 |
| commit | ab50528ab5b5dd282c43384d3e246068048e0840 (patch) | |
| tree | edcd47013dd47535ae2087e4b59546ef855f06fb /sound | |
| parent | 4ff4fc6fea57c0fcf301bf8591ed337cd27dce64 (diff) | |
| download | linux-next-history-ab50528ab5b5dd282c43384d3e246068048e0840.tar.gz | |
ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
Update the driver to use the new core helper that waits for the device
to enumerate on SoundWire and be initialised by the SoundWire core.
Suggested-by: Niranjan H Y <niranjan.hy@ti.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Niranjan H Y <niranjan.hy@ti.com>
Link: https://patch.msgid.link/20260514083358.2559733-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/codecs/tac5xx2-sdw.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sound/soc/codecs/tac5xx2-sdw.c b/sound/soc/codecs/tac5xx2-sdw.c index 917b36ac1cd3b..bb12cfb6da12b 100644 --- a/sound/soc/codecs/tac5xx2-sdw.c +++ b/sound/soc/codecs/tac5xx2-sdw.c @@ -1437,7 +1437,6 @@ static s32 tac5xx2_sdca_dev_resume(struct device *dev) { struct tac5xx2_prv *tac_dev = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); - unsigned long t; int ret; if (!tac_dev->first_hw_init_done) { @@ -1445,19 +1444,10 @@ static s32 tac5xx2_sdca_dev_resume(struct device *dev) return 0; } - if (!slave->unattach_request) - goto regmap_sync; - - t = wait_for_completion_timeout(&slave->initialization_complete, - msecs_to_jiffies(TAC5XX2_PROBE_TIMEOUT_MS)); - if (!t) { - dev_err(&slave->dev, "resume: initialization timed out\n"); - sdw_show_ping_status(slave->bus, true); - return -ETIMEDOUT; - } - slave->unattach_request = 0; + ret = sdw_slave_wait_for_init(slave, TAC5XX2_PROBE_TIMEOUT_MS); + if (ret) + return ret; -regmap_sync: regcache_cache_only(tac_dev->regmap, false); regcache_mark_dirty(tac_dev->regmap); ret = regcache_sync(tac_dev->regmap); |
