Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: lee@kernel.org, vkoul@kernel.org
Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
	linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
	mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] Add SoundWire deatach helper
Date: Mon, 31 Aug 2026 12:50:17 +0100	[thread overview]
Message-ID: <20260831115019.1616202-1-ckeepax@opensource.cirrus.com> (raw)

Currently, if a SoundWire driver takes an action that causes the device
to detach from the bus it needs to be careful. There will be a period of
time until the detach is recognised by the core, if the driver immediately
calls sdw_slave_wait_for_init() it is possible for that to complete
before the detach has been recognised. Leaving the driver with a device
that is potentially not ready for what follows.

To avoid this race add a new helper that drivers can use to inform the
core the device will detach. This clears the enumeration completions
ensuring that sdw_slave_wait_for_init() can't complete until the device
re-attaches.

This is the third part of a longer series of moving these slave
attach/deatach operations into the core:

https://lore.kernel.org/linux-sound/20260512103022.1154645-1-ckeepax@opensource.cirrus.com/
https://lore.kernel.org/linux-sound/20260608102714.2503120-1-ckeepax@opensource.cirrus.com/

I have based this series off Vinod's soundwire tree as that probably
makes sense for which tree to take it through.

Thanks,
Charles

Charles Keepax (2):
  soundwire: Add a helper function to indicate a device will detach
  mfd: cs42l43: Move to core detach helper

 drivers/mfd/cs42l43-sdw.c     |  2 --
 drivers/mfd/cs42l43.c         | 15 +--------------
 drivers/soundwire/bus.h       |  6 ------
 include/linux/mfd/cs42l43.h   |  1 -
 include/linux/soundwire/sdw.h | 29 +++++++++++++++++++++++++++++
 5 files changed, 30 insertions(+), 23 deletions(-)

-- 
2.47.3


             reply	other threads:[~2026-08-31 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 11:50 Charles Keepax [this message]
2026-08-31 11:50 ` [PATCH 1/2] soundwire: Add a helper function to indicate a device will detach Charles Keepax
2026-08-31 11:50 ` [PATCH 2/2] mfd: cs42l43: Move to core detach helper 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=20260831115019.1616202-1-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=vkoul@kernel.org \
    --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