diff options
author | Veerabhadrarao Badiganti <vbadigan@codeaurora.org> | 2018-06-06 19:54:17 +0530 |
---|---|---|
committer | Veerabhadrarao Badiganti <vbadigan@codeaurora.org> | 2018-06-25 11:29:52 +0530 |
commit | a4d77289532a5dd7c0d638dc20f69ea73f98f2cf (patch) | |
tree | adcce6dbdb5ae8ebbcacac09026bef5d342b3065 /include/linux/mmc/host.h | |
parent | 8c2f6269d16d27dfccf9cff904a67df161a97fe3 (diff) |
mmc: core: Update SD card removal logic based on cd gpio state
Update SD card removal event processing logic. Instead of pinging
the card to know the card presence rely on card-detect gpio state.
On multi-card tray designs, the same card-tray would be used for SD
card and SIM cards. If SD card is placed at the rightmost location
in the tray, then SIM card may come in contact with SD card power-
supply while removing the tray. It may result in SIM damage.
For protecting SIM from this issue, in multi-card tray designs,
a h/w fix done such that pmic gets a notification of SD card
removal event (through hardwiring) and it turns off the SD card
voltage regulators immediately. All this will be done much before SD
card driver starts processing card removal event.
To support this design, SD card driver shouldn't turn-on the
regulator while processing card removal event. But the present mmc
driver turns-on regulator (multiple times if the card was in suspend
state). To avoid turning on SD card regulator in card removal path,
updating the card removal processing logic is based on card detect
gpio state.
Change-Id: I13708a60c9378519713ebec8071ae3b130012a93
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index f564303a28f9..9b1870897b02 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -642,6 +642,7 @@ static inline void *mmc_cmdq_private(struct mmc_host *host) #define mmc_bus_manual_resume(host) ((host)->bus_resume_flags & \ MMC_BUSRESUME_MANUAL_RESUME) +#ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME static inline void mmc_set_bus_resume_policy(struct mmc_host *host, int manual) { if (manual) @@ -649,6 +650,11 @@ static inline void mmc_set_bus_resume_policy(struct mmc_host *host, int manual) else host->bus_resume_flags &= ~MMC_BUSRESUME_MANUAL_RESUME; } +#else +static inline void mmc_set_bus_resume_policy(struct mmc_host *host, int manual) +{ +} +#endif extern int mmc_resume_bus(struct mmc_host *host); |