Skip to contentSkip to conversation

mmc: sdhci: add a callback of signal voltage switching

PATCH Superseded Yangbo Lu 1 participant 1 message Sep 14, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/6 mmc: sdhci: add a callback of signal voltage switching

Add a signal voltage switching callback to let host use its own switching process.

---
 drivers/mmc/host/sdhci.c | 5 +++++
 drivers/mmc/host/sdhci.h | 2 ++
 2 files changed, 7 insertions(+)
drivers/mmc/host/sdhci.c +5 -0
index 64b7fdb..9b3d4c2 100644
@@ -1757,6 +1757,11 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 	if (host->version < SDHCI_SPEC_300)
 		return 0;
 
+	if (host->ops->signal_voltage_switch) {
+		host->ops->signal_voltage_switch(host, ios->signal_voltage);
+		return 0;
+	}
+
 	ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 
 	switch (ios->signal_voltage) {
drivers/mmc/host/sdhci.h +2 -0
index 7c02ff4..723f034 100644
@@ -544,6 +544,8 @@ struct sdhci_ops {
 					 struct mmc_card *card,
 					 unsigned int max_dtr, int host_drv,
 					 int card_drv, int *drv_type);
+	void	(*signal_voltage_switch)(struct sdhci_host *host,
+					 unsigned char signal_voltage);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
Signature · 1 line
2.1.0.27.g96db324