mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Set WAKE MSI monitor variable before enabling WAKE IRQ
After enabling WAKE IRQ during runtime PM suspend, it is able to come anytime because device wants to wake up. In order to avoid missing to handle the IRQ and missing resume, set WAKE MSI monitor variable before enabling WAKE IRQ. Change-Id: I450e2d7a28f68818e12ff000a36275707a9b97b0 CRs-fixed: 2496603
This commit is contained in:
parent
99ffbda5dc
commit
41e3af09f7
2 changed files with 4 additions and 3 deletions
|
|
@ -1256,8 +1256,7 @@ irqreturn_t hif_wake_interrupt_handler(int irq, void *context)
|
|||
|
||||
HIF_INFO("wake interrupt received on irq %d", irq);
|
||||
|
||||
if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx) &&
|
||||
hif_pm_runtime_is_suspended(hif_ctx)) {
|
||||
if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx)) {
|
||||
hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0);
|
||||
hif_pm_runtime_request_resume(hif_ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2807,7 +2807,6 @@ void hif_process_runtime_suspend_success(struct hif_opaque_softc *hif_ctx)
|
|||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
|
||||
hif_runtime_pm_set_state_suspended(scn);
|
||||
hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 1);
|
||||
hif_log_runtime_suspend_success(scn);
|
||||
}
|
||||
|
||||
|
|
@ -2854,9 +2853,12 @@ int hif_runtime_suspend(struct hif_opaque_softc *hif_ctx)
|
|||
return errno;
|
||||
}
|
||||
|
||||
hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 1);
|
||||
|
||||
errno = hif_bus_suspend_noirq(hif_ctx);
|
||||
if (errno) {
|
||||
HIF_ERROR("%s: failed bus suspend noirq: %d", __func__, errno);
|
||||
hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0);
|
||||
goto bus_resume;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue