summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-tegra.c
diff options
context:
space:
mode:
authorPavan Kunapuli <pkunapuli@nvidia.com>2011-10-13 20:18:54 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:25 -0800
commit9e5f037176f3ee2a5b6b33681ad7ee2a5b410e36 (patch)
treee97f654ea00e59b1fc3ff1e416232a7398be4096 /drivers/mmc/host/sdhci-tegra.c
parent53049d978228515bbe963fcdbacd171c8e26e401 (diff)
sdhci: tegra: Switch OFF/ON power rails in suspend/resume
Switching OFF the sd power rails in suspend and switching them ON in resume. Change-Id: I5145e211111b8144f14ee0338388eeacb34bb003 Reviewed-on: http://git-master/r/57877 Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R527ae8de0561bfedd3afb2fce62ad4d2876575bc
Diffstat (limited to 'drivers/mmc/host/sdhci-tegra.c')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 525e8bf59df1..1b4739e64735 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -288,13 +288,30 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhci, unsigned int clock)
static int tegra_sdhci_suspend(struct sdhci_host *sdhci, pm_message_t state)
{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(sdhci);
+ struct tegra_sdhci_host *tegra_host = pltfm_host->priv;
+
tegra_sdhci_set_clock(sdhci, 0);
+ /* Disable the power rails if any */
+ if (tegra_host->vdd_slot_reg)
+ regulator_disable(tegra_host->vdd_slot_reg);
+ if (tegra_host->vdd_io_reg)
+ regulator_disable(tegra_host->vdd_io_reg);
return 0;
}
static int tegra_sdhci_resume(struct sdhci_host *sdhci)
{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(sdhci);
+ struct tegra_sdhci_host *tegra_host = pltfm_host->priv;
+
+ /* Enable the power rails if any */
+ if (tegra_host->vdd_io_reg)
+ regulator_enable(tegra_host->vdd_io_reg);
+ if (tegra_host->vdd_slot_reg)
+ regulator_enable(tegra_host->vdd_slot_reg);
+
/* Setting the min identification clock of freq 400KHz */
tegra_sdhci_set_clock(sdhci, 400000);