mmc: sdhci: add interface for 1.2v voltage switch
PATCH 1/1 mmc: sdhci: add interface for 1.2v voltage switch
From: Kevin Liu <[email protected]>
Add the interface since emmc may need 1.2v voltage. The function should be controller specific.
Signed-off-by Kevin Liu <[email protected]>
--- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-)
drivers/mmc/host/sdhci.c +3 -0
@@ -1754,6 +1754,9 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,else if (!(ctrl &SDHCI_CTRL_VDD_180 ) && (ios->signal_voltage ==MMC_SIGNAL_VOLTAGE_180 ))return sdhci_do_1_8v_signal_voltage_switch (host, ctrl); +else if ((ios->signal_voltage ==MMC_SIGNAL_VOLTAGE_120 ) && + host->ops->signal_voltage_switch_1_2v) +return host->ops->signal_voltage_switch_1_2v (host);else /* No signal voltage switch required */ return 0 ;
drivers/mmc/host/sdhci.h +1 -0
@@ -280,6 +280,7 @@ struct sdhci_ops {void (*hw_reset)(struct sdhci_host *host);void (*platform_suspend)(struct sdhci_host *host);void (*platform_resume)(struct sdhci_host *host); +int (*signal_voltage_switch_1_2v)(struct sdhci_host *host); };#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
Signature · 1 line
1.7.0.4