Re: sdhci: sdio wakeup and free_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

The driver (libertas, mwifiex) is responsible for setting host->pm_flags
if it wants the SDIO to stay powered during the next system suspend.

Once the hardware wakes up the system, we'll register the handler again,
it will fire because the line is still raised, and we'll handle it the
normal way.  The card isn't reinitialized if MMC_PM_KEEP_POWER is set.

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
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


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux