Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96621034 authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

mmc: core: dont send PON during suspend



During suspend, eMMC VCC can be turned off. So instead of sending
a power off notification, send a sleep command. According to the
eMMC 4.5 specification, this is the only time where its clearly
mentioned that the VCC regulator can be turned OFF.

This has been clarified in eMMC 5.0 specification and this applies
even if PON with sleep is not sent to the card.

Change-Id: Id30ca76e8953ddb7a77e8fcfd4ec01469ceeb068
Signed-off-by: default avatarKrishna Konda <kkonda@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent eef77aa0
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -2341,8 +2341,6 @@ static void mmc_detect(struct mmc_host *host)
static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
{
	int err = 0;
	unsigned int notify_type = is_suspend ? EXT_CSD_POWER_OFF_SHORT :
					EXT_CSD_POWER_OFF_LONG;

	err = mmc_suspend_clk_scaling(host);
	if (err) {
@@ -2373,10 +2371,7 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
	if (err)
		goto out;

	if (mmc_can_poweroff_notify(host->card) &&
		((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend))
		err = mmc_poweroff_notify(host->card, notify_type);
	else if (mmc_can_sleep(host->card))
	if (mmc_can_sleep(host->card))
		err = mmc_sleep(host);
	else if (!mmc_host_is_spi(host))
		err = mmc_deselect_cards(host);