summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPavan Kunapuli <pkunapuli@nvidia.com>2013-09-02 14:19:30 +0530
committerRiham Haidar <rhaidar@nvidia.com>2013-09-08 00:32:19 -0700
commitd0df551df5eb20e35f9f3d45536d7f60f30be5ba (patch)
tree018ea994c3f5e0aefe6e0704737374b85f087f0a /drivers/mmc
parentdbce70c975587128c7c420b62e3ad0dc5737fbae (diff)
mmc: sdhci: Platform hooks for handling power off
Added platform specific callback to allow for any special handling of MMC_POWER_OFF. Bug 1353926 Change-Id: I0918984461746ff28824b7dd2873b652225e3d1a Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/267312 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c4
-rw-r--r--drivers/mmc/host/sdhci.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 27d06a76af80..7c67c3e86620 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1539,6 +1539,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
*/
if (!ios->clock && host->ops->set_clock)
host->ops->set_clock(host, ios->clock);
+
+ if ((ios->power_mode == MMC_POWER_OFF) && host->ops->platform_power_off)
+ host->ops->platform_power_off(host, ios->power_mode);
+
}
static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 583d6c7d0d66..3cf67a1739b0 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -275,6 +275,7 @@ struct sdhci_ops {
unsigned int (*get_cd)(struct sdhci_host *host);
void (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
void (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
+ void (*platform_power_off)(struct sdhci_host *host, u8 power_mode);
int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs);
void (*hw_reset)(struct sdhci_host *host);