linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] soundwire: Fix driver removal
@ 2022-09-07 10:13 Richard Fitzgerald
  2022-09-07 10:13 ` [PATCH 1/7] soundwire: bus: Do not forcibly disable child pm_runtime Richard Fitzgerald
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Richard Fitzgerald @ 2022-09-07 10:13 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, lgirdwood,
	peter.ujfalusi, ranjani.sridharan, kai.vehmanen, daniel.baluta,
	sanyog.r.kale, broonie
  Cc: alsa-devel, sound-open-firmware, linux-kernel, patches,
	Richard Fitzgerald

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(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-09-13  9:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 10:13 [PATCH 0/7] soundwire: Fix driver removal Richard Fitzgerald
2022-09-07 10:13 ` [PATCH 1/7] soundwire: bus: Do not forcibly disable child pm_runtime Richard Fitzgerald
2022-09-12 10:43   ` Pierre-Louis Bossart
2022-09-07 10:13 ` [PATCH 2/7] soundwire: intel_init: Separate shutdown and cleanup Richard Fitzgerald
2022-09-07 10:13 ` [PATCH 3/7] ASoC: SOF: Intel: Don't disable Soundwire interrupt before the bus has shut down Richard Fitzgerald
2022-09-07 11:26   ` Mark Brown
2022-09-07 10:13 ` [PATCH 4/7] soundwire: bus: Add remove callback to struct sdw_master_ops Richard Fitzgerald
2022-09-07 10:14 ` [PATCH 5/7] soundwire: intel: Don't disable interrupt until children are removed Richard Fitzgerald
2022-09-12 10:53   ` Pierre-Louis Bossart
2022-09-12 15:36     ` Richard Fitzgerald
2022-09-12 17:12       ` Pierre-Louis Bossart
2022-09-13  9:29         ` Richard Fitzgerald
2022-09-07 10:14 ` [PATCH 6/7] soundwire: intel: Don't disable pm_runtime " Richard Fitzgerald
2022-09-07 10:14 ` [PATCH 7/7] soundwire: bus: Fix premature removal of sdw_slave objects Richard Fitzgerald
2022-09-12 10:57   ` Pierre-Louis Bossart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).