[PATCH] mmc: sdhci: add interface for 1.2v voltage switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kevin Liu <kliu5@xxxxxxxxxxx>

Add the interface since emmc may need 1.2v voltage.
The function should be controller specific.

Signed-off-by: Kevin Liu <kliu5@xxxxxxxxxxx>
---
 drivers/mmc/host/sdhci.c |    3 +++
 drivers/mmc/host/sdhci.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 08dae93..8c56435 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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;
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 2e89dac..e847fa3 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -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
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux