diff mbox series

[16/22] mmc: disable the mmc clock during power off

Message ID 1494613000-8156-17-git-send-email-jjhiblot@ti.com
State New
Headers show
Series None | expand

Commit Message

Jean-Jacques Hiblot May 12, 2017, 6:16 p.m. UTC
From: Kishon Vijay Abraham I <kishon@ti.com>

There is no point in having the mmc clock enabled during
power off. Disable the mmc clock. This is similar to how it's
programmed in Linux Kernel.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass May 15, 2017, 3:28 a.m. UTC | #1
On 12 May 2017 at 12:16, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> From: Kishon Vijay Abraham I <kishon@ti.com>
>
> There is no point in having the mmc clock enabled during
> power off. Disable the mmc clock. This is similar to how it's
> programmed in Linux Kernel.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 70b7d19..415484e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1943,6 +1943,7 @@  static void mmc_power_up(struct mmc *mmc)
 static void mmc_power_off(struct mmc *mmc)
 {
 	mmc_set_vdd(mmc, false);
+	mmc_set_clock(mmc, 1, true);
 }
 
 static void mmc_power_cycle(struct mmc *mmc)