summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-of-arasan.c
diff options
context:
space:
mode:
authorMilan Stevanovic <milan.o.stevanovic@gmail.com>2017-11-28 03:02:57 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2017-12-11 14:48:06 +0300
commit043f2dca367c752bf8a570130f4f0ace4b4be4a8 (patch)
tree2287b9779b27486925a4f48186e5c57cf61c830e /drivers/mmc/host/sdhci-of-arasan.c
parentc14e60963ec1e0595250955271abfe4d5e96b3cb (diff)
downloadlinux-043f2dca367c752bf8a570130f4f0ace4b4be4a8.tar.xz
mmc: sdhci-of-arasan: Add sdhci_arasan_set_power
The power register needs to have a valid voltage set even when the power supply is managed by an external regulator. Signed-off-by: Milan Stevanovic <milan.o.stevanovic@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-of-arasan.c')
-rw-r--r--drivers/mmc/host/sdhci-of-arasan.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 0720ea717011..fb572066a88b 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -262,6 +262,17 @@ static int sdhci_arasan_voltage_switch(struct mmc_host *mmc,
return -EINVAL;
}
+static void sdhci_arasan_set_power(struct sdhci_host *host, unsigned char mode,
+ unsigned short vdd)
+{
+ if (!IS_ERR(host->mmc->supply.vmmc)) {
+ struct mmc_host *mmc = host->mmc;
+
+ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
+ }
+ sdhci_set_power_noreg(host, mode, vdd);
+}
+
static const struct sdhci_ops sdhci_arasan_ops = {
.set_clock = sdhci_arasan_set_clock,
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
@@ -269,6 +280,7 @@ static const struct sdhci_ops sdhci_arasan_ops = {
.set_bus_width = sdhci_set_bus_width,
.reset = sdhci_arasan_reset,
.set_uhs_signaling = sdhci_set_uhs_signaling,
+ .set_power = sdhci_arasan_set_power,
};
static const struct sdhci_pltfm_data sdhci_arasan_pdata = {