soundwire: intel_init: resume all devices on exit.
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 10 Apr 2024 02:34:38 +0000 (02:34 +0000)
committerVinod Koul <vkoul@kernel.org>
Thu, 11 Apr 2024 17:22:51 +0000 (22:52 +0530)
commit4cd5ea6de156850d555e1af8244a530812ae6ff6
tree45ec00a3d2ba4effe47314dc3182d3328ffe2893
parentf2fa6865566483582aed4511ef603b44239b227b
soundwire: intel_init: resume all devices on exit.

When the manager becomes pm_runtime active in the remove procedure,
peripherals will become attached, and do the initialization
process. We have to wait until all the devices are fully resumed
before the cleanup, otherwise there is a possible race condition where
asynchronous workqueues initiate transfers on the bus that cannot
complete. This will ensure there are no SoundWire registers accessed
after the bus is powered-down.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240410023438.487017-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel_init.c