summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-xenon.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2017-08-30 15:10:08 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 15:10:08 +0200
commit689dc7eb2ca2bd89872ef1510ff912cf31815811 (patch)
treeaa1e2bdc86b81d6f28e8e71d808d63b3959ffb62 /drivers/mmc/host/sdhci-xenon.c
parentmmc: core: Move mmc_start_areq() declaration (diff)
parentmmc: sdhci-xenon: add set_power callback (diff)
downloadlinux-689dc7eb2ca2bd89872ef1510ff912cf31815811.tar.xz
linux-689dc7eb2ca2bd89872ef1510ff912cf31815811.zip
Merge branch 'fixes' into next
Diffstat (limited to 'drivers/mmc/host/sdhci-xenon.c')
-rw-r--r--drivers/mmc/host/sdhci-xenon.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index 6012926b1aed..306ffaf7a5b2 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -210,8 +210,27 @@ static void xenon_set_uhs_signaling(struct sdhci_host *host,
sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
}
+static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
+ unsigned short vdd)
+{
+ struct mmc_host *mmc = host->mmc;
+ u8 pwr = host->pwr;
+
+ sdhci_set_power_noreg(host, mode, vdd);
+
+ if (host->pwr == pwr)
+ return;
+
+ if (host->pwr == 0)
+ vdd = 0;
+
+ if (!IS_ERR(mmc->supply.vmmc))
+ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
+}
+
static const struct sdhci_ops sdhci_xenon_ops = {
.set_clock = sdhci_set_clock,
+ .set_power = xenon_set_power,
.set_bus_width = sdhci_set_bus_width,
.reset = xenon_reset,
.set_uhs_signaling = xenon_set_uhs_signaling,