Messages in this thread | | | Date | Wed, 2 Mar 2011 10:12:22 -0500 (EST) | From | Alan Stern <> | Subject | Re: [linux-pm] [RFC,PATCHv3 0/3] sdhci runtime_pm implementation |
| |
On Wed, 2 Mar 2011, Rafael J. Wysocki wrote:
> > > How it works is, basically, that when the device signals wakeup, it either > > > causes a PME# signal to be raised (parallel PCI), or a PME Message to be > > > sent upstream (PCIe). In the first case it will cause a platform event > > > (eg. ACPI GPE) to occur and the handle of that event will resume your > > > device (using pm_request_resume()). In the second case it will cause the PCIe > > > root port handling the PME Message to generate an interrupt and the handler of > > > that interrupt will resume your device. > > Thanks, that explain a lot how it works. > > What I still dont understand is that the wake source I'll have (e.g. > > sd card insert) is still an interrupt source. > > So it is supposed to generate interrupt until the interrupt source is > > acknowledged. > > Are we supposed to mask that interrupt source while suspended to make > > sure we have either wake or interrupt? > > I think the interrupt should be masked while suspended and the driver's resume > routine should unmask it.
Right. That's how the PCI-based USB host controller drivers work. The suspend routine disables interrupt generation and enables PME wakeup signals, and the resume routine does the reverse.
Alan Stern
| |