Hi, Chris 2012/9/24 Chris Ball <cjb@xxxxxxxxxx>: > Hi, > > On Fri, Sep 21 2012, Kevin Liu wrote: >> Can latest code support sdio wakeup? > > Yes, it should work. OLPC has been using it in production with > libertas_sdio for several years. > >> I see at last of sdhci_suspend_host, irq will be freed. But if the irq >> is used for wakeup system like sdio wakeup irq? Then system can't be >> woken up. > > free_irq() is just removing the handler while the stack is suspended, it > isn't stopping your hardware from waking up the system. Your hardware > needs to be programmed to wake the system if the SDIO IRQ fires; many > SoCs will do this as long as the SDIO is in 1-bit data width mode (which > doesn't require the card clock to be powered). We turn on 1-bit mode if > MMC_PM_KEEP_POWER is set in host->pm_flags. > free_irq will also disable the interrupt line. Below is the comments and code: The handler is removed and if the interrupt line is no longer in use by any driver it is disabled. /* If this was the last handler, shut down the IRQ line: */ if (!desc->action) irq_shutdown(desc); So if the irq is disabled, then system can't be woken up. Thanks Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html