From: "Ivan T. Ivanov" <ivan.ivanov@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Tim Kryger <tim.kryger@gmail.com>,
Aisheng Dong <b29396@freescale.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH 2/3] mmc: sdhci: don't use card state polling when CD GPIO is defined
Date: Fri, 26 Jun 2015 13:00:09 +0300 [thread overview]
Message-ID: <1435312810-23957-3-git-send-email-ivan.ivanov@linaro.org> (raw)
In-Reply-To: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org>
There is no reason to use polling for card detection state change when
drivers are using dedicated GPIO for this. Don't poll in this case.
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
---
drivers/mmc/host/sdhci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8bafb9f..0b65752 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3121,7 +3121,8 @@ int sdhci_add_host(struct sdhci_host *host)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
- !(mmc->caps & MMC_CAP_NONREMOVABLE))
+ !(mmc->caps & MMC_CAP_NONREMOVABLE) &&
+ IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
mmc->caps |= MMC_CAP_NEEDS_POLL;
/* If there are external regulators, get them */
--
1.9.1
next prev parent reply other threads:[~2015-06-26 10:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 10:00 [PATCH 0/3] mmc: sdhci: Card detection fixes Ivan T. Ivanov
2015-06-26 10:00 ` [PATCH 1/3] mmc: sdhci: let GPIO based card detection have higher precedence Ivan T. Ivanov
2015-06-26 10:19 ` Adrian Hunter
2015-06-26 11:00 ` Ivan T. Ivanov
2015-06-26 11:09 ` Adrian Hunter
2015-06-26 11:12 ` Ivan T. Ivanov
2015-06-26 10:00 ` Ivan T. Ivanov [this message]
2015-06-26 10:00 ` [PATCH 3/3] mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set Ivan T. Ivanov
2015-06-26 10:31 ` [PATCH 0/3] mmc: sdhci: Card detection fixes Jaehoon Chung
2015-06-26 11:05 ` Ivan T. Ivanov
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=1435312810-23957-3-git-send-email-ivan.ivanov@linaro.org \
--to=ivan.ivanov@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=b29396@freescale.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tim.kryger@gmail.com \
--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).