diff options
author | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-06-29 13:15:21 +0200 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2011-01-20 19:27:15 +0100 |
commit | 01a4711bd21348e1604694f3eb528df784dc0896 (patch) | |
tree | 551a78acc678b80a812741b24af34c038f531b14 /drivers/mmc | |
parent | 29c8053d0f7997345ea93fd0e22bc9998cbe1bff (diff) |
ccwmx51: Make it possible to disable SD and SMSC wake up sources.
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mx_sdhci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c index e15293e34c6d..9934eced8fc2 100644 --- a/drivers/mmc/host/mx_sdhci.c +++ b/drivers/mmc/host/mx_sdhci.c @@ -37,6 +37,7 @@ #include <linux/mmc/card.h> #include <linux/clk.h> #include <linux/regulator/consumer.h> +#include <linux/irq.h> #include <linux/slab.h> #include <asm/dma.h> @@ -1749,6 +1750,8 @@ static int sdhci_suspend(struct platform_device *pdev, pm_message_t state) { struct sdhci_chip *chip; int i, ret; + struct irq_desc *desc; + int irq; chip = dev_get_drvdata(&pdev->dev); if (!chip) @@ -1756,8 +1759,14 @@ static int sdhci_suspend(struct platform_device *pdev, pm_message_t state) DBG("Suspending...\n"); + irq = platform_get_irq(pdev, 1); if( device_may_wakeup( &pdev->dev ) ) - enable_irq_wake(platform_get_irq(pdev, 1)); + enable_irq_wake(irq); + else { + desc = irq_to_desc(irq); + if(desc->status & IRQ_WAKEUP) + disable_irq_wake(irq); + } for (i = 0; i < chip->num_slots; i++) { if (!chip->hosts[i]) |