From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, peter.ujfalusi@linux.intel.com,
oder_chiou@realtek.com, jack.yu@realtek.com,
shumingf@realtek.com, shenghao-ding@ti.com, niranjan.hy@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 10/17] ASoC: rt722: Use new SoundWire enumeration helper
Date: Tue, 5 May 2026 17:48:00 +0100 [thread overview]
Message-ID: <20260505164807.4108684-11-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20260505164807.4108684-1-ckeepax@opensource.cirrus.com>
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.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/rt722-sdca-sdw.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index 0a5b3ffa90daf..a5feba3d0c182 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -501,7 +501,7 @@ static int rt722_sdca_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev);
- unsigned long time;
+ int ret;
if (!rt722->first_hw_init)
return 0;
@@ -514,20 +514,12 @@ static int rt722_sdca_dev_resume(struct device *dev)
rt722->disable_irq = false;
}
mutex_unlock(&rt722->disable_irq_lock);
- goto regmap_sync;
}
- time = wait_for_completion_timeout(&slave->initialization_complete,
- msecs_to_jiffies(RT722_PROBE_TIMEOUT));
- if (!time) {
- dev_err(&slave->dev, "Initialization not complete, timed out\n");
- sdw_show_ping_status(slave->bus, true);
+ ret = sdw_slave_wait_for_init(slave, RT722_PROBE_TIMEOUT);
+ if (ret)
+ return ret;
- return -ETIMEDOUT;
- }
-
-regmap_sync:
- slave->unattach_request = 0;
regcache_cache_only(rt722->regmap, false);
regcache_sync(rt722->regmap);
return 0;
--
2.47.3
next prev parent reply other threads:[~2026-05-05 16:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 16:47 [PATCH 00/17] Add a new SoundWire enumeration helper Charles Keepax
2026-05-05 16:47 ` [PATCH 01/17] soundwire: Add a helper function to wait for device initialisation Charles Keepax
2026-05-05 16:57 ` Charles Keepax
2026-05-06 10:53 ` Charles Keepax
2026-05-05 16:47 ` [PATCH 02/17] ASoC: cs42l42: Use new SoundWire enumeration helper Charles Keepax
2026-05-06 0:13 ` Mark Brown
2026-05-06 8:26 ` Charles Keepax
2026-05-05 16:47 ` [PATCH 03/17] ASoC: max98363: " Charles Keepax
2026-05-05 16:47 ` [PATCH 04/17] ASoC: max98373: " Charles Keepax
2026-05-05 16:47 ` [PATCH 05/17] ASoC: rt700: " Charles Keepax
2026-05-05 16:47 ` [PATCH 06/17] ASoC: rt711: " Charles Keepax
2026-05-05 16:47 ` [PATCH 07/17] ASoC: rt712: " Charles Keepax
2026-05-05 16:47 ` [PATCH 08/17] ASoC: rt715: " Charles Keepax
2026-05-05 16:47 ` [PATCH 09/17] ASoc: rt721: " Charles Keepax
2026-05-05 16:48 ` Charles Keepax [this message]
2026-05-05 16:48 ` [PATCH 11/17] ASoC: rt1017: " Charles Keepax
2026-05-05 16:48 ` [PATCH 12/17] ASoC: rt1308: " Charles Keepax
2026-05-05 16:48 ` [PATCH 13/17] ASoC: rt1316: " Charles Keepax
2026-05-05 16:48 ` [PATCH 14/17] ASoC: rt1318: " Charles Keepax
2026-05-05 16:48 ` [PATCH 15/17] ASoC: rt1320: " Charles Keepax
2026-05-05 16:48 ` [PATCH 16/17] ASoC: rt5682: " Charles Keepax
2026-05-05 16:48 ` [PATCH 17/17] ASoC: tas2783: " Charles Keepax
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=20260505164807.4108684-11-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=jack.yu@realtek.com \
--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=oder_chiou@realtek.com \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sen@ti.com \
--cc=shenghao-ding@ti.com \
--cc=shumingf@realtek.com \
--cc=yung-chuan.liao@linux.intel.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