soundwire: stream: Move remaining register accesses over to no_pm
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 25 Nov 2022 14:20:28 +0000 (14:20 +0000)
committerVinod Koul <vkoul@kernel.org>
Mon, 9 Jan 2023 16:16:27 +0000 (21:46 +0530)
commit545c365185a47672b1d5cc13c84057a1e874993c
tree9a104c0cc874d5f899d8471a84125033b5542391
parentb275bf45ba1da1681d75f6434637442f53bf3fa5
soundwire: stream: Move remaining register accesses over to no_pm

There is no need to play with the runtime reference everytime a register
is accessed. All the remaining "pm" style register accesses trace back
to 4 functions:

sdw_prepare_stream
sdw_deprepare_stream
sdw_enable_stream
sdw_disable_stream

Any sensible implementation will need to hold a runtime reference
across all those functions, it makes no sense to be allowing the
device/bus to suspend whilst streams are being prepared/enabled. And
certainly in the case of the all existing users, they all call these
functions from hw_params/prepare/trigger/hw_free callbacks in ALSA,
which will have already runtime resumed all the audio devices
associated during the open callback.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221125142028.1118618-5-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/bus.c
drivers/soundwire/stream.c