From c3d355d133a5ee30e38d63b769415431be3392c3 Mon Sep 17 00:00:00 2001 From: Sarthak Garg Date: Tue, 6 Oct 2020 14:36:51 +0530 Subject: [PATCH] mmc: core: Avoid mmc_power_off during shutdown/reboot During shutdown/sleep putting vdd-io in LPM mode after sending the Poweroff notify command is leading to OCP. Avoid putting vdd-io in LPM mode during shutdown/sleep. This change is inline with earlier kernels. Change-Id: I08698bc8b4f1c420910747b6374485f6265d553b Signed-off-by: Sarthak Garg --- drivers/mmc/core/mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index b975d6d0116f..bddb041a8a0e 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2041,7 +2041,8 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) err = mmc_deselect_cards(host); if (!err) { - mmc_power_off(host); + if (is_suspend) + mmc_power_off(host); mmc_card_set_suspended(host->card); } out: