[PATCH v4 00/18] Add a new SoundWire enumeration helper

Charles Keepax posted 18 patches 1 month ago
drivers/soundwire/bus.c            | 31 ++++++++++++++++++++++++++++++
include/linux/soundwire/sdw.h      |  8 ++++++++
sound/soc/codecs/cs35l56-sdw.c     | 10 ++++------
sound/soc/codecs/cs42l42-sdw.c     | 11 ++++-------
sound/soc/codecs/max98363.c        | 17 ++++------------
sound/soc/codecs/max98373-sdw.c    | 18 ++++-------------
sound/soc/codecs/rt1017-sdca-sdw.c | 18 ++++-------------
sound/soc/codecs/rt1308-sdw.c      | 18 ++++-------------
sound/soc/codecs/rt1316-sdw.c      | 18 ++++-------------
sound/soc/codecs/rt1318-sdw.c      | 16 ++++-----------
sound/soc/codecs/rt1320-sdw.c      | 16 ++++-----------
sound/soc/codecs/rt5682-sdw.c      | 16 ++++-----------
sound/soc/codecs/rt700-sdw.c       | 18 ++++-------------
sound/soc/codecs/rt711-sdca-sdw.c  | 16 ++++-----------
sound/soc/codecs/rt711-sdw.c       | 14 ++++----------
sound/soc/codecs/rt712-sdca-dmic.c | 19 ++++--------------
sound/soc/codecs/rt712-sdca-sdw.c  | 16 ++++-----------
sound/soc/codecs/rt715-sdca-sdw.c  | 18 ++++-------------
sound/soc/codecs/rt715-sdw.c       | 18 ++++-------------
sound/soc/codecs/rt721-sdca-sdw.c  | 16 ++++-----------
sound/soc/codecs/rt722-sdca-sdw.c  | 16 ++++-----------
sound/soc/codecs/tas2783-sdw.c     | 18 ++++-------------
22 files changed, 119 insertions(+), 247 deletions(-)
[PATCH v4 00/18] Add a new SoundWire enumeration helper
Posted by Charles Keepax 1 month ago
Add a new SoundWire enumeration helper function, many drivers have
almost identical code in runtime resume so it makes sense to move this
to the core.

It is worth noting this is really step one of a larger process, there
are a few drivers that do more custom things and are not covered by this
series. But this series picks up the low hanging fruit and moves things
in a good direction.

The next step is to look at drivers that also wait at probe time, where
the unattached_request flag is not going to be valid.

Thanks,
Charles

Changes since v1:
 - Add a stub for sdw_slave_wait_for_init()
 - Add kerneldoc for sdw_slave_wait_for_init()
 - Update cs35l56 as well
 - Correct bug in the update of cs42l42

Changes since v2:
 - Corrected timeout_us to timeout_ms

Changes since v3:
 - Actually fix kernel doc

Charles Keepax (18):
  soundwire: Add a helper function to wait for device initialisation
  ASoC: cs35l56: Use new SoundWire enumeration helper
  ASoC: cs42l42: Use new SoundWire enumeration helper
  ASoC: max98363: Use new SoundWire enumeration helper
  ASoC: max98373: Use new SoundWire enumeration helper
  ASoC: rt700: Use new SoundWire enumeration helper
  ASoC: rt711: Use new SoundWire enumeration helper
  ASoC: rt712: Use new SoundWire enumeration helper
  ASoC: rt715: Use new SoundWire enumeration helper
  ASoc: rt721: Use new SoundWire enumeration helper
  ASoC: rt722: Use new SoundWire enumeration helper
  ASoC: rt1017: Use new SoundWire enumeration helper
  ASoC: rt1308: Use new SoundWire enumeration helper
  ASoC: rt1316: Use new SoundWire enumeration helper
  ASoC: rt1318: Use new SoundWire enumeration helper
  ASoC: rt1320: Use new SoundWire enumeration helper
  ASoC: rt5682: Use new SoundWire enumeration helper
  ASoC: tas2783: Use new SoundWire enumeration helper

 drivers/soundwire/bus.c            | 31 ++++++++++++++++++++++++++++++
 include/linux/soundwire/sdw.h      |  8 ++++++++
 sound/soc/codecs/cs35l56-sdw.c     | 10 ++++------
 sound/soc/codecs/cs42l42-sdw.c     | 11 ++++-------
 sound/soc/codecs/max98363.c        | 17 ++++------------
 sound/soc/codecs/max98373-sdw.c    | 18 ++++-------------
 sound/soc/codecs/rt1017-sdca-sdw.c | 18 ++++-------------
 sound/soc/codecs/rt1308-sdw.c      | 18 ++++-------------
 sound/soc/codecs/rt1316-sdw.c      | 18 ++++-------------
 sound/soc/codecs/rt1318-sdw.c      | 16 ++++-----------
 sound/soc/codecs/rt1320-sdw.c      | 16 ++++-----------
 sound/soc/codecs/rt5682-sdw.c      | 16 ++++-----------
 sound/soc/codecs/rt700-sdw.c       | 18 ++++-------------
 sound/soc/codecs/rt711-sdca-sdw.c  | 16 ++++-----------
 sound/soc/codecs/rt711-sdw.c       | 14 ++++----------
 sound/soc/codecs/rt712-sdca-dmic.c | 19 ++++--------------
 sound/soc/codecs/rt712-sdca-sdw.c  | 16 ++++-----------
 sound/soc/codecs/rt715-sdca-sdw.c  | 18 ++++-------------
 sound/soc/codecs/rt715-sdw.c       | 18 ++++-------------
 sound/soc/codecs/rt721-sdca-sdw.c  | 16 ++++-----------
 sound/soc/codecs/rt722-sdca-sdw.c  | 16 ++++-----------
 sound/soc/codecs/tas2783-sdw.c     | 18 ++++-------------
 22 files changed, 119 insertions(+), 247 deletions(-)

-- 
2.47.3
Re: [PATCH v4 00/18] Add a new SoundWire enumeration helper
Posted by Mark Brown 1 month ago
On Tue, 12 May 2026 11:30:04 +0100, Charles Keepax wrote:
> Add a new SoundWire enumeration helper
> 
> Add a new SoundWire enumeration helper function, many drivers have
> almost identical code in runtime resume so it makes sense to move this
> to the core.
> 
> It is worth noting this is really step one of a larger process, there
> are a few drivers that do more custom things and are not covered by this
> series. But this series picks up the low hanging fruit and moves things
> in a good direction.
> 
> [...]

Applied to

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

Thanks!

[01/18] soundwire: Add a helper function to wait for device initialisation
        https://git.kernel.org/broonie/sound/c/3492e8b494c1
[02/18] ASoC: cs35l56: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/9dc2b0d599c6
[03/18] ASoC: cs42l42: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/47e2f687b0c5
[04/18] ASoC: max98363: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/7fa0ff88f882
[05/18] ASoC: max98373: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/8e5768eb4eaa
[06/18] ASoC: rt700: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/c5b0783d18a6
[07/18] ASoC: rt711: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/953ee481561b
[08/18] ASoC: rt712: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/d5bd2f7239f6
[09/18] ASoC: rt715: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/e154b2472f6b
[10/18] ASoc: rt721: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/cc05ab0a664e
[11/18] ASoC: rt722: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/0b6401749586
[12/18] ASoC: rt1017: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/ab579acef4bf
[13/18] ASoC: rt1308: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/1ab950b47b3a
[14/18] ASoC: rt1316: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/b7997fcacf94
[15/18] ASoC: rt1318: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/210f109efdfd
[16/18] ASoC: rt1320: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/4461603eda13
[17/18] ASoC: rt5682: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/fee0a8b4f0da
[18/18] ASoC: tas2783: Use new SoundWire enumeration helper
        https://git.kernel.org/broonie/sound/c/ac6d4f298160

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