mmc: msm_sdcc: Delay SDCC resume until needed
Resuming a card could take a significant amount of
time, impacting user experience. Previous solution
used pm_runtime helpers which conflicted with
commit d292ce79 - "PM: Limit race conditions between
runtime PM and system sleep".
Instead, current solution does nothing on pm_resume, and
uses an internal flag to keep track of this decision
in preparation for the next request.
CRs-Fixed: 356367
Change-Id: I0ed5426a4374785967bce0732b09c60b65196658
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.h b/drivers/mmc/host/msm_sdcc.h
index 50477da..718ef43 100644
--- a/drivers/mmc/host/msm_sdcc.h
+++ b/drivers/mmc/host/msm_sdcc.h
@@ -384,7 +384,6 @@
unsigned int dummy_52_needed;
unsigned int dummy_52_sent;
- bool is_resumed;
struct wake_lock sdio_wlock;
struct wake_lock sdio_suspend_wlock;
struct timer_list req_tout_timer;
@@ -401,6 +400,7 @@
bool sdcc_suspended;
bool sdio_wakeupirq_disabled;
struct mutex clk_mutex;
+ bool pending_resume;
};
int msmsdcc_set_pwrsave(struct mmc_host *mmc, int pwrsave);