From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Tardy Subject: Re: [RFC,PATCHv3 0/3] sdhci runtime_pm implementation Date: Tue, 1 Mar 2011 21:06:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Alan Stern Cc: linux-pm@lists.linux-foundation.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-pm@vger.kernel.org On Tue, Mar 1, 2011 at 8:57 PM, Alan Stern wrot= e: > On Tue, 1 Mar 2011, Pierre Tardy wrote: > >> On Tue, Mar 1, 2011 at 8:33 PM, Alan Stern w= rote: >> > On Tue, 1 Mar 2011, Pierre Tardy wrote: >> > >> >> Please find sdhci runtime_pm implementation. >> >> >> >> It uses clock gating fw as a tip to know when our chip is idle. >> >> It implements wake up from card insertion/removal. >> >> >> >> This is RFC, please dont merge yet. I really would like to have deep = review >> >> from PCI linux-pm guys. >> >> >> >> Opens are: >> >> >> >> 1/ Not sure if the pci configs in the driver in rpm_suspend/resume fl= ow >> >> =A0are not duplicate from what the core is doing. >> > >> > There may be one or two small errors. >> > >> >> 2/ Wakeup from D3hot: I cannot find any driver that is implementing i= t in current upstream, >> > >> > Other drivers do it, but they use PCI PME# instead of interrupts. >> Could you please elaborate? >> My understanding is that PCI PME will generate MSI, which translate in >> interrupt. > > It depends on the platform. =A0On systems with ACPI, PCI PME generates an > ACPI I/O event, which is handled by the ACPI and PM cores. =A0It does not > invoke the device driver's interrupt handler. So, let's say, in the ACPI case, if the interrupt handler dont get called, how would the driver know that he got a sdcard insert event, and trigger a mmc_rescan() ? Regards, Pierre