Skip to contentSkip to conversation

mmc: sdhci: add interface for 1.2v voltage switch

PATCH New Kevin Liu 1 participant 1 message Sep 11, 2012

Subsystems (2)
lore
Share & tools
lore

Kevin Liu

author
#0 lore raw

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.

---
 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
index 08dae93..8c56435 100644
@@ -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
index 2e89dac..e847fa3 100644
@@ -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