Skip to content

soundwire: Fix driver removal

Richard Fitzgerald alsa-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7soundwire: bus: Do not forcibly disable child pm_runtimedrivers/soundwire/bus.c+0 -21 reply
2/7soundwire: intel_init: Separate shutdown and cleanupdrivers/soundwire/intel_init.c include/linux/soundwire/sdw_intel.h sound/soc/sof/intel/hda.c+25 -50 replies
3/7ASoC: SOF: Intel: Don't disable Soundwire interrupt before the bus has shut downsound/soc/sof/intel/hda.c+14 -61 reply
4/7soundwire: bus: Add remove callback to struct sdw_master_opsdrivers/soundwire/bus.c include/linux/soundwire/sdw.h+7 -10 replies
5/7soundwire: intel: Don't disable interrupt until children are removeddrivers/soundwire/intel.c+8 -14 replies
6/7soundwire: intel: Don't disable pm_runtime until children are removeddrivers/soundwire/intel.c drivers/soundwire/intel_init.c+3 -20 replies
7/7soundwire: bus: Fix premature removal of sdw_slave objectsdrivers/soundwire/bus.c drivers/soundwire/slave.c+43 -81 reply

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchMark BrownPierre-Louis Bossart
1/7
2/7
3/7A-b
4/7
5/7R-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] soundwire: Fix driver removal

Removal of child drivers and the bus driver was broken and would result in a slew of various errors.

Most of these were caused by the code shutting down in the wrong order, shutting down the bus driver first. The bus driver should be shut down after the child drivers have been removed (compare with the I2C and SPI subsystem for example).

These patches fix that.

A secondary problem was over the cleanup of child drivers. The removal functions were not the opposite of the probe function, and the ownership of struct sdw_slave is tricky because it mixes two separate usages and currently has to be "owned" by the bus driver.

Tested with 4 peripherals on 1 bus and 8 peripherals on 2 buses.

Richard Fitzgerald (7):
soundwire: bus: Do not forcibly disable child pm_runtime
soundwire: intel_init: Separate shutdown and cleanup
ASoC: SOF: Intel: Don't disable Soundwire interrupt before the bus has
shut down
soundwire: bus: Add remove callback to struct sdw_master_ops
soundwire: intel: Don't disable interrupt until children are removed
soundwire: intel: Don't disable pm_runtime until children are removed
soundwire: bus: Fix premature removal of sdw_slave objects

 drivers/soundwire/bus.c             | 37 ++++++++++++++++++++++++-----
 drivers/soundwire/intel.c           | 13 ++++++++--
 drivers/soundwire/intel_init.c      | 25 +++++++++++++++----
 drivers/soundwire/slave.c           | 21 ++++++++++++----
 include/linux/soundwire/sdw.h       |  3 ++-
 include/linux/soundwire/sdw_intel.h |  2 ++
 sound/soc/sof/intel/hda.c           | 16 ++++++++++---
 7 files changed, 96 insertions(+), 21 deletions(-)
Signature · 1 line
2.30.2