From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Liu Subject: [PATCH 2/2] mmc: sdhci: fix dummy regulator issue Date: Mon, 7 Jan 2013 13:38:51 +0800 Message-ID: <1357537131-8000-2-git-send-email-kliu5@marvell.com> References: <1357537131-8000-1-git-send-email-kliu5@marvell.com> Return-path: Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:52627 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961Ab3AGFkA (ORCPT ); Mon, 7 Jan 2013 00:40:00 -0500 In-Reply-To: <1357537131-8000-1-git-send-email-kliu5@marvell.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: linux-pm@vger.kernel.org, Mark Brown , linux-mmc@vger.kernel.org, Chris Ball Cc: Marek Szyprowski , Rainer Kaluscha , Rainer Kaluscha , Philip Rakity , Zhangfei Gao , Haojian Zhuang , Chao Xie , Kevin Liu , Kevin Liu 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 --- 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