Skip to content

Commit

Permalink
mmc: sdhci: milbeaut: Use sdhci_set_power_and_voltage()
Browse files Browse the repository at this point in the history
The sdhci core provides a helper function with the same functionality as
this controller's set_power() callback. Use it instead.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200306174413.20634-4-nsaenzjulienne@suse.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Nicolas Saenz Julienne authored and Ulf Hansson committed Mar 24, 2020
1 parent c2c5252 commit d2abc6e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/mmc/host/sdhci-milbeaut.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,25 +121,14 @@ static void sdhci_milbeaut_reset(struct sdhci_host *host, u8 mask)
}
}

static void sdhci_milbeaut_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_milbeaut_ops = {
.voltage_switch = sdhci_milbeaut_soft_voltage_switch,
.get_min_clock = sdhci_milbeaut_get_min_clock,
.reset = sdhci_milbeaut_reset,
.set_clock = sdhci_set_clock,
.set_bus_width = sdhci_set_bus_width,
.set_uhs_signaling = sdhci_set_uhs_signaling,
.set_power = sdhci_milbeaut_set_power,
.set_power = sdhci_set_power_and_bus_voltage,
};

static void sdhci_milbeaut_bridge_reset(struct sdhci_host *host,
Expand Down

0 comments on commit d2abc6e

Please sign in to comment.