From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, zhangyi@everest-semi.com, nathan@kernel.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH] ASoC: es9356: Use new SoundWire enumeration helper
Date: Tue, 2 Jun 2026 11:27:49 +0100 [thread overview]
Message-ID: <20260602102749.3962261-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.
Link: https://lore.kernel.org/linux-sound/20260512103022.1154645-1-ckeepax@opensource.cirrus.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/es9356.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/es9356.c b/sound/soc/codecs/es9356.c
index 78fddd9d01711..670e918b56a46 100644
--- a/sound/soc/codecs/es9356.c
+++ b/sound/soc/codecs/es9356.c
@@ -1105,24 +1105,15 @@ static int es9356_sdca_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct es9356_sdw_priv *es9356 = dev_get_drvdata(dev);
- unsigned long time;
+ int ret;
- if (!slave->unattach_request) {
+ if (!slave->unattach_request)
es9356->disable_irq = false;
- goto regmap_sync;
- }
-
- time = wait_for_completion_timeout(&slave->initialization_complete,
- msecs_to_jiffies(es9356_PROBE_TIMEOUT));
- if (!time) {
- dev_err(&slave->dev, "Initialization not complete, timed out\n");
- sdw_show_ping_status(slave->bus, true);
- return -ETIMEDOUT;
- }
+ ret = sdw_slave_wait_for_init(slave, es9356_PROBE_TIMEOUT);
+ if (ret)
+ return ret;
-regmap_sync:
- slave->unattach_request = 0;
regcache_cache_only(es9356->regmap, false);
regcache_sync(es9356->regmap);
return 0;
--
2.47.3
next reply other threads:[~2026-06-02 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 10:27 Charles Keepax [this message]
2026-06-02 15:19 ` Mark Brown
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=20260602102749.3962261-1-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=zhangyi@everest-semi.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
all inboxes | Powered by JetHome®