瀏覽代碼

qcacmn: Wake up system for early interrupt wakeup during suspending

During system suspending, the target might request wakeup early to the
host. The host will wakeup the system directly to abort current suspend
to avoid mismatching PM state between host & target.

Change-Id: Icf6e58ff24cbe072ef56aa22820432efb2ca1932
CRs-Fixed: 2559306
Tiger Yu 5 年之前
父節點
當前提交
987de79182
共有 3 個文件被更改,包括 17 次插入0 次删除
  1. 2 0
      hif/src/hif_main.c
  2. 2 0
      qdf/inc/qdf_lock.h
  3. 13 0
      qdf/linux/src/qdf_lock.c

+ 2 - 0
hif/src/hif_main.c

@@ -1283,6 +1283,8 @@ irqreturn_t hif_wake_interrupt_handler(int irq, void *context)
 	if (hif_is_ut_suspended(scn))
 		hif_ut_fw_resume(scn);
 
+	qdf_pm_system_wakeup();
+
 	return IRQ_HANDLED;
 }
 

+ 2 - 0
qdf/inc/qdf_lock.h

@@ -494,6 +494,8 @@ QDF_STATUS qdf_wake_lock_release(qdf_wake_lock_t *lock, uint32_t reason);
 
 QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock);
 
+void qdf_pm_system_wakeup(void);
+
 QDF_STATUS qdf_runtime_pm_get(void);
 QDF_STATUS qdf_runtime_pm_put(void);
 QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock);

+ 13 - 0
qdf/linux/src/qdf_lock.c

@@ -28,6 +28,7 @@
 #include <hif.h>
 #endif
 #include <i_qdf_lock.h>
+#include <linux/suspend.h>
 
 /**
  * qdf_mutex_create() - Initialize a mutex
@@ -386,6 +387,18 @@ QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
 #endif
 qdf_export_symbol(qdf_wake_lock_destroy);
 
+/**
+ * qdf_pm_system_wakeup() - wakeup system
+ *
+ * Return: None
+ */
+void qdf_pm_system_wakeup(void)
+{
+	pm_system_wakeup();
+}
+
+qdf_export_symbol(qdf_pm_system_wakeup);
+
 #ifdef FEATURE_RUNTIME_PM
 /**
  * qdf_runtime_pm_get() - do a get opperation on the device