soundwire: amd: fix for wake interrupt handling for clockstop mode
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Wed, 27 Mar 2024 06:31:43 +0000 (12:01 +0530)
committerVinod Koul <vkoul@kernel.org>
Thu, 28 Mar 2024 18:10:33 +0000 (23:40 +0530)
commit63dc588e7af1392576071a1841298198c9cddee3
tree021e9c7c625c72812b626978f7d1be87567b014c
parent4cece764965020c22cff7665b18a012006359095
soundwire: amd: fix for wake interrupt handling for clockstop mode

When SoundWire Wake interrupt is enabled along with SoundWire Wake
enable register, SoundWire wake interrupt will be reported
when SoundWire manager is in D3 state and ACP is in D3 state.

When SoundWire Wake interrupt is reported, it will invoke runtime
resume of the SoundWire manager device.

In case of system level suspend, for ClockStop Mode SoundWire Wake
interrupt should be disabled.
It should be enabled only for runtime suspend scenario.
Change wake interrupt enable/disable sequence for ClockStop Mode in
system level suspend and runtime suspend sceanrio.

Fixes: 9cf1efc5ed2d ("soundwire: amd: add pm_prepare callback and pm ops support")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20240327063143.2266464-2-Vijendar.Mukunda@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/amd_manager.c
drivers/soundwire/amd_manager.h