]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soundwire: amd: change the soundwire wake enable/disable sequence
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Fri, 7 Feb 2025 06:58:36 +0000 (12:28 +0530)
committerVinod Koul <vkoul@kernel.org>
Thu, 13 Feb 2025 16:21:06 +0000 (21:51 +0530)
During runtime suspend scenario, SoundWire wake should be enabled and
during system level suspend scenario SoundWire wake should be disabled.

Implement the SoundWire wake enable/disable sequence as per design flow
for SoundWire poweroff mode.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20250207065841.4718-2-Vijendar.Mukunda@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/amd_manager.c

index 5a54b10daf77a81e48ec76fccd38aa6a8351f01c..9d80623787247cf23410917b8f573595023a0ccc 100644 (file)
@@ -1139,6 +1139,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
                amd_sdw_wake_enable(amd_manager, false);
                return amd_sdw_clock_stop(amd_manager);
        } else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
+               amd_sdw_wake_enable(amd_manager, false);
                /*
                 * As per hardware programming sequence on AMD platforms,
                 * clock stop should be invoked first before powering-off
@@ -1166,6 +1167,7 @@ static int __maybe_unused amd_suspend_runtime(struct device *dev)
                amd_sdw_wake_enable(amd_manager, true);
                return amd_sdw_clock_stop(amd_manager);
        } else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
+               amd_sdw_wake_enable(amd_manager, true);
                ret = amd_sdw_clock_stop(amd_manager);
                if (ret)
                        return ret;