Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci: at91: Use sdhci_set_power_and_voltage()

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-5-nsaenzjulienne@suse.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Nicolas Saenz Julienne and committed by
Ulf Hansson
98160562 d2abc6e2

+1 -17
+1 -17
drivers/mmc/host/sdhci-of-at91.c
··· 101 101 sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); 102 102 } 103 103 104 - /* 105 - * In this specific implementation of the SDHCI controller, the power register 106 - * needs to have a valid voltage set even when the power supply is managed by 107 - * an external regulator. 108 - */ 109 - static void sdhci_at91_set_power(struct sdhci_host *host, unsigned char mode, 110 - unsigned short vdd) 111 - { 112 - if (!IS_ERR(host->mmc->supply.vmmc)) { 113 - struct mmc_host *mmc = host->mmc; 114 - 115 - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); 116 - } 117 - sdhci_set_power_noreg(host, mode, vdd); 118 - } 119 - 120 104 static void sdhci_at91_set_uhs_signaling(struct sdhci_host *host, 121 105 unsigned int timing) 122 106 { ··· 130 146 .set_bus_width = sdhci_set_bus_width, 131 147 .reset = sdhci_at91_reset, 132 148 .set_uhs_signaling = sdhci_at91_set_uhs_signaling, 133 - .set_power = sdhci_at91_set_power, 149 + .set_power = sdhci_set_power_and_bus_voltage, 134 150 }; 135 151 136 152 static const struct sdhci_pltfm_data sdhci_sama5d2_pdata = {