soundwire: intel: refine runtime pm for SDW_INTEL_CLK_STOP_BUS_RESET
authorRander Wang <rander.wang@intel.com>
Mon, 17 Aug 2020 15:29:23 +0000 (23:29 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 18 Aug 2020 06:31:05 +0000 (12:01 +0530)
commit08abad9f45f105e947d91822bdbc47650fbd7773
tree1c8d29542f3a86830c430e63661f1449cbbe3bb6
parent61fb830bf9ca02f040fdfe65b714bea492a44986
soundwire: intel: refine runtime pm for SDW_INTEL_CLK_STOP_BUS_RESET

When all the links are suspended, the HDaudio controller may suspend
and the power rails to the SoundWire IP may be disabled, requiring a
complete re-initialization/enumeration on resume. However, if one or
more Masters remained active, the HDaudio controller will remain active
and the power rails will remain enabled. As a result, during the link
resume step we can check if the context was preserved by verifying if
the clock was stopped, and avoid doing a complete bus reset and
re-enumeration.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200817152923.3259-13-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel.c