summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlejandro Gonzalez <alex.gonzalez@digi.com>2010-06-21 18:29:48 +0200
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-06-23 11:26:39 +0200
commit2512cc2076c2af03cab91aed79a0a9eee1222528 (patch)
treefbd7870d2a578f9f19ad2fd55f35fd479d404336 /drivers
parentff2ec0ade9360e9672ad667ab0cea4910cb32fb6 (diff)
ccwmx51js: Implement MMC/SD as suspend wake up source
Note that the microSD card has no card detect capability so only the SD card can act as a wake up source. Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/mx_sdhci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c
index b36a3ef8b005..22d18b0bf110 100644
--- a/drivers/mmc/host/mx_sdhci.c
+++ b/drivers/mmc/host/mx_sdhci.c
@@ -1657,6 +1657,9 @@ static int sdhci_suspend(struct platform_device *pdev, pm_message_t state)
DBG("Suspending...\n");
+ if( device_may_wakeup( &pdev->dev ) )
+ enable_irq_wake(platform_get_irq(pdev, 1));
+
for (i = 0; i < chip->num_slots; i++) {
if (!chip->hosts[i])
continue;
@@ -2006,6 +2009,10 @@ static int __devinit sdhci_probe_slot(struct platform_device
mmc_hostname(mmc), host->detect_irq, host->irq,
(host->flags & SDHCI_USE_DMA) ? "INTERNAL DMA" : "PIO");
+ /* Mark the SD/MMC as capable of being a wake up source */
+ if ( mmc_plat->card_inserted_state )
+ device_set_wakeup_capable(&pdev->dev,1);
+
return 0;
out6:
@@ -2113,7 +2120,7 @@ static int sdhci_probe(struct platform_device *pdev)
* FIXME
* PPH This should be revisited and implemented a bit different.
* We pass quirks per device through the platform_data variable to allow
- * different settings on each interface (DMA vs PIO, etc.
+ * different settings on each interface (DMA vs PIO, etc.
*/
if (mmc_plat->quirks != 0)
chip->quirks = mmc_plat->quirks;