Skip to content

Commit

Permalink
mmc: sdhci-of-arasan: Add sdhci_arasan_set_power
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Milan Stevanovic authored and Ulf Hansson committed Dec 11, 2017
1 parent c14e609 commit 043f2dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/mmc/host/sdhci-of-arasan.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,25 @@ 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,
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
.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 = {
Expand Down

0 comments on commit 043f2dc

Please sign in to comment.