soundwire: amd: add runtime pm ops for AMD SoundWire manager driver
[linux-block.git] / include / linux / soundwire / sdw_amd.h
index df60bc0de6fcee9dc808ff1ff55d1ca86930c8eb..ceecad74aef9ffe4b11540c18096e928a024f53c 100644 (file)
@@ -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;
 };