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

Commit 358ac29e authored by Krishna Konda's avatar Krishna Konda Committed by Subhash Jadavani
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: I6c424bed3158132af7f9c2a2a701af7369fd5ec7
Signed-off-by: default avatarKrishna Konda <kkonda@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to changes in 3.14]
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent ca1367cb
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -1927,8 +1927,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;

	BUG_ON(!host);
	BUG_ON(!host->card);
@@ -1954,10 +1952,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);