All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
@ 2026-05-14  8:33 Charles Keepax
  2026-05-14 10:41 ` Holalu Yogendra, Niranjan
  2026-05-15  1:31 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Charles Keepax @ 2026-05-14  8:33 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, pierre-louis.bossart, niranjan.hy, shenghao-ding,
	kevin-lu, baojun.xu, sen, linux-sound, linux-kernel, patches

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
  2026-05-14  8:33 [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper Charles Keepax
@ 2026-05-14 10:41 ` Holalu Yogendra, Niranjan
  2026-05-15  1:31 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Holalu Yogendra, Niranjan @ 2026-05-14 10:41 UTC (permalink / raw)
  To: Charles Keepax, broonie@kernel.org
  Cc: lgirdwood@gmail.com, pierre-louis.bossart@linux.dev,
	Ding, Shenghao, Lu, Kevin, Xu, Baojun, Wang, Sen,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com

> On 14:04-20260514, Charles Keepax wrote:
> Subject: [PATCH] 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>
> ---
> 
> Add the missing update that was pointed out by Niranjan.
> 
Thanks Charles! I've tested this version. Works as expected.

Tested-by: Niranjan H Y <niranjan.hy@ti.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
  2026-05-14  8:33 [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper Charles Keepax
  2026-05-14 10:41 ` Holalu Yogendra, Niranjan
@ 2026-05-15  1:31 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-05-15  1:31 UTC (permalink / raw)
  To: Charles Keepax
  Cc: lgirdwood, pierre-louis.bossart, niranjan.hy, shenghao-ding,
	kevin-lu, baojun.xu, sen, linux-sound, linux-kernel, patches

On Thu, 14 May 2026 09:33:58 +0100, Charles Keepax wrote:
> ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2

Thanks!

[1/1] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper
      https://git.kernel.org/broonie/sound/c/ab50528ab5b5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-15 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  8:33 [PATCH] ASoC: tac5xx2-sdw: Use new SoundWire enumeration helper Charles Keepax
2026-05-14 10:41 ` Holalu Yogendra, Niranjan
2026-05-15  1:31 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.