From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, pierre-louis.bossart@linux.dev,
niranjan.hy@ti.com, shenghao-ding@ti.com, kevin-lu@ti.com,
baojun.xu@ti.com, sen@ti.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
Date: Thu, 14 May 2026 09:33:58 +0100 [thread overview]
Message-ID: <20260514083358.2559733-1-ckeepax@opensource.cirrus.com> (raw)
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>
---
Add the missing update that was pointed out by Niranjan.
Thanks,
Charles
sound/soc/codecs/tac5xx2-sdw.c | 16 +++-------------
1 file 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);
--
2.47.3
next reply other threads:[~2026-05-14 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 8:33 Charles Keepax [this message]
2026-05-14 10:41 ` [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper Holalu Yogendra, Niranjan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260514083358.2559733-1-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=niranjan.hy@ti.com \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sen@ti.com \
--cc=shenghao-ding@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox