aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVijendar Mukunda <[email protected]>2023-03-21 10:38:59 +0530
committerVinod Koul <[email protected]>2023-04-12 15:30:36 +0530
commit81ff58ff71ad9dcddf5caffcf912cde6589d07bd (patch)
tree852cad3676e8c044878fc0c96cecf77a5978c1d5 /include/linux
parent65f93e4096a07abd41acf0d240715bd8c7ef7eeb (diff)
soundwire: amd: add runtime pm ops for AMD SoundWire manager driver
Add support for runtime pm ops for AMD SoundWire manager driver. Signed-off-by: Vijendar Mukunda <[email protected]> Signed-off-by: Mastan Katragadda <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/soundwire/sdw_amd.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw_amd.h b/include/linux/soundwire/sdw_amd.h
index df60bc0de6fc..ceecad74aef9 100644
--- a/include/linux/soundwire/sdw_amd.h
+++ b/include/linux/soundwire/sdw_amd.h
@@ -8,6 +8,21 @@
#include <linux/soundwire/sdw.h>
+/* AMD pm_runtime quirk definitions */
+
+/*
+ * Force the clock to stop(ClockStopMode0) when suspend callback
+ * is invoked.
+ */
+#define AMD_SDW_CLK_STOP_MODE 1
+
+/*
+ * Stop the bus when runtime suspend/system level suspend callback
+ * is invoked. If set, a complete bus reset and re-enumeration will
+ * be performed when the bus restarts. In-band wake interrupts are
+ * not supported in this mode.
+ */
+#define AMD_SDW_POWER_OFF_MODE 2
#define ACP_SDW0 0
#define ACP_SDW1 1
@@ -57,6 +72,7 @@ struct sdw_amd_dai_runtime {
* @instance: SoundWire manager instance
* @quirks: SoundWire manager quirks
* @wake_en_mask: wake enable mask per SoundWire manager
+ * @clk_stopped: flag set to true when clock is stopped
* @power_mode_mask: flag interprets amd SoundWire manager power mode
* @dai_runtime_array: dai runtime array
*/
@@ -86,6 +102,7 @@ struct amd_sdw_manager {
u32 quirks;
u32 wake_en_mask;
u32 power_mode_mask;
+ bool clk_stopped;
struct sdw_amd_dai_runtime **dai_runtime_array;
};