From: Yangbo Lu <yangbo.lu@freescale.com>
To: linux-mmc@vger.kernel.org, ulf.hansson@linaro.org
Cc: Yangbo Lu <yangbo.lu@freescale.com>
Subject: [PATCH 1/6] mmc: sdhci: add a callback of signal voltage switching
Date: Mon, 14 Sep 2015 19:43:25 +0800 [thread overview]
Message-ID: <1442231005-10570-1-git-send-email-yangbo.lu@freescale.com> (raw)
Add a signal voltage switching callback to let host use its own
switching process.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
---
drivers/mmc/host/sdhci.c | 5 +++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 64b7fdb..9b3d4c2 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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) {
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 7c02ff4..723f034 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -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
--
2.1.0.27.g96db324
reply other threads:[~2015-09-14 11:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442231005-10570-1-git-send-email-yangbo.lu@freescale.com \
--to=yangbo.lu@freescale.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).