From: Kevin Liu <kliu5@marvell.com>
To: linux-pm@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Rainer Kaluscha <rainer.kaluscha@web.de>,
Rainer Kaluscha <ich@rainer-kaluscha.de>,
Philip Rakity <prakity@nvidia.com>,
Zhangfei Gao <zhangfei.gao@gmail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Chao Xie <cxie4@marvell.com>, Kevin Liu <keyuan.liu@gmail.com>,
Kevin Liu <kliu5@marvell.com>
Subject: [PATCH 2/2] mmc: sdhci: fix dummy regulator issue
Date: Mon, 7 Jan 2013 13:38:51 +0800 [thread overview]
Message-ID: <1357537131-8000-2-git-send-email-kliu5@marvell.com> (raw)
In-Reply-To: <1357537131-8000-1-git-send-email-kliu5@marvell.com>
Should consider the case that dummy regulator is used for host->vmmc
and host->vqmmc and skip the regulator voltage check.
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
drivers/mmc/host/sdhci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c13415c..561d126 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2897,8 +2897,8 @@ int sdhci_add_host(struct sdhci_host *host)
}
} else {
regulator_enable(host->vqmmc);
- if (!regulator_is_supported_voltage(host->vqmmc, 1700000,
- 1950000))
+ if ((regulator_is_supported_voltage(host->vqmmc, 1700000,
+ 1950000) <= 0) && !regulator_is_dummy(host->vqmmc))
caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
@@ -2965,7 +2965,7 @@ int sdhci_add_host(struct sdhci_host *host)
}
#ifdef CONFIG_REGULATOR
- if (host->vmmc) {
+ if (host->vmmc && !regulator_is_dummy(host->vmmc)) {
ret = regulator_is_supported_voltage(host->vmmc, 2700000,
3600000);
if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
--
1.7.9.5
next prev parent reply other threads:[~2013-01-07 5:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 5:38 [PATCH 1/2] regulator: add regulator_is_dummy function Kevin Liu
2013-01-07 5:38 ` Kevin Liu [this message]
2013-01-07 11:25 ` Mark Brown
2013-01-07 11:36 ` Kevin Liu
2013-01-07 13:18 ` Mark Brown
2013-01-07 12:30 ` Dr. Rainer Kaluscha
2013-01-07 13:22 ` Mark Brown
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=1357537131-8000-2-git-send-email-kliu5@marvell.com \
--to=kliu5@marvell.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cjb@laptop.org \
--cc=cxie4@marvell.com \
--cc=haojian.zhuang@gmail.com \
--cc=ich@rainer-kaluscha.de \
--cc=keyuan.liu@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=prakity@nvidia.com \
--cc=rainer.kaluscha@web.de \
--cc=zhangfei.gao@gmail.com \
/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).