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

Charles Keepax posted 18 patches 1 month ago
There is a newer version of this series
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 v3 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

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 v3 00/18] Add a new SoundWire enumeration helper
Posted by Holalu Yogendra, Niranjan 1 month ago
> On 15:44-20260512, Charles Keepax wrote:
> Subject: [PATCH v3 00/18] 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.
>
Last week we merged new driver tac5xx2-sdw.c 
Should this series include the change as well ? If not, I can add a new patch once this series is merged. 

Regards,
Niranjan
Re: [PATCH v3 00/18] Add a new SoundWire enumeration helper
Posted by Charles Keepax 1 month ago
On Tue, May 12, 2026 at 11:13:15AM +0000, Holalu Yogendra, Niranjan wrote:
> > On 15:44-20260512, Charles Keepax wrote:
> > Subject: [PATCH v3 00/18] 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.
> >
> Last week we merged new driver tac5xx2-sdw.c 
> Should this series include the change as well ? If not, I can add a new patch once this series is merged. 

Ah yes thanks, I did miss that one. Its not essential we do this
all in one go since the old way still works. So yeah if I have to
do another spin I will add that, otherwise we can fix later.

Thanks,
Charles