diff options
author | Dong Aisheng <b29396@freescale.com> | 2014-01-13 18:27:58 +0800 |
---|---|---|
committer | Dong Aisheng <b29396@freescale.com> | 2014-01-15 15:06:03 +0800 |
commit | 12956372deeff385231f0a636c9d7cd771286f5b (patch) | |
tree | cc02da48e4468d33c049247100917356c2d9da8c /drivers/mmc | |
parent | cb589c8679f802214e2c319befe2bc49653007ba (diff) |
ENGR00295184-7 mmc: sdhci: do not enable card cd wakeup for gpio case
Do not need to enable the controller card cd interrupt wakeup
if using GPIO as card detect since it's meaningless.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 72ba46d4db82..beb3fc94947b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2546,6 +2546,7 @@ out: #ifdef CONFIG_PM void sdhci_enable_irq_wakeups(struct sdhci_host *host) { + int gpio_cd = mmc_gpio_get_cd(host->mmc); u8 val; u8 mask = SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE | SDHCI_WAKE_ON_INT; @@ -2553,7 +2554,8 @@ void sdhci_enable_irq_wakeups(struct sdhci_host *host) val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL); val |= mask ; /* Avoid fake wake up */ - if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) + if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION || + !IS_ERR_VALUE(gpio_cd)) val &= ~(SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE); sdhci_writeb(host, val, SDHCI_WAKE_UP_CONTROL); } |