diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2017-08-30 16:10:08 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-08-30 16:10:08 +0300 |
commit | 689dc7eb2ca2bd89872ef1510ff912cf31815811 (patch) | |
tree | aa1e2bdc86b81d6f28e8e71d808d63b3959ffb62 /drivers/mmc/host | |
parent | 906d5ff6188953f4981df39e9999f858542df9ce (diff) | |
parent | 99c14fc360dbbb583a03ab985551b12b5c5ca4f1 (diff) | |
download | linux-689dc7eb2ca2bd89872ef1510ff912cf31815811.tar.xz |
Merge branch 'fixes' into next
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/sdhci-xenon.c | 19 |
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, |