summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@nxp.com>2020-02-19 16:22:40 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2020-03-24 14:35:41 +0100
commite65bb38824711559844ba932132f417bc5a355e2 (patch)
tree950b4683c6bf1c3435e4f4d81917c69e91494526
parenta161c45f2979566c1dafed7fe9807b01f5b0cf73 (diff)
downloadlinux-stable-e65bb38824711559844ba932132f417bc5a355e2.tar.gz
linux-stable-e65bb38824711559844ba932132f417bc5a355e2.tar.bz2
linux-stable-e65bb38824711559844ba932132f417bc5a355e2.zip
mmc: sdhci: do not enable card detect interrupt for gpio cd type
Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE, we also do not need to handle controller native card detect interrupt for gpio cd type. If we wrong enabled the card detect interrupt for gpio case, it will cause a lot of unexpected card detect interrupts during data transfer which should not happen. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/1582100563-20555-2-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sdhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9c3745118e49..c59566363a42 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -153,7 +153,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
u32 present;
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
- !mmc_card_is_removable(host->mmc))
+ !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc))
return;
if (enable) {