public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pierre Tardy <tardyp@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, linux-mmc@vger.kernel.org
Subject: Re: [linux-pm] [RFC,PATCHv3 0/3] sdhci runtime_pm implementation
Date: Wed, 2 Mar 2011 00:49:36 +0100	[thread overview]
Message-ID: <201103020049.36902.rjw@sisk.pl> (raw)
In-Reply-To: <AANLkTinNG9ecqSGk+zDjd0A+nLXmwHQkRot0WZ18amsv@mail.gmail.com>

On Wednesday, March 02, 2011, Pierre Tardy wrote:
> On Tue, Mar 1, 2011 at 10:07 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Tuesday, March 01, 2011, Pierre Tardy wrote:
> >> On Tue, Mar 1, 2011 at 8:33 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
> >> > 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 flow
> >> >>  are 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 it 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.
> >
> > Your driver won't get those interrupts.
> >
> > 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.

Thanks,
Rafael

  reply	other threads:[~2011-03-01 23:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 18:15 [RFC,PATCHv3 0/3] sdhci runtime_pm implementation Pierre Tardy
2011-03-01 18:15 ` [RFC,PATCHv3 1/3] mmc: sdhci-pci: Enable runtime PM support Pierre Tardy
2011-03-01 19:46   ` [linux-pm] [RFC, PATCHv3 " Alan Stern
2011-03-01 18:15 ` [RFC,PATCHv3 2/3] mmc: sdhci: use ios->clock to know when sdhci is idle Pierre Tardy
2011-03-01 18:15 ` [RFC,PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm Pierre Tardy
2011-03-01 19:53   ` [linux-pm] [RFC, PATCHv3 " Alan Stern
2011-03-01 20:01     ` Pierre Tardy
2011-03-01 20:27       ` Alan Stern
2011-03-01 20:48         ` Pierre Tardy
2011-03-01 19:33 ` [linux-pm] [RFC,PATCHv3 0/3] sdhci runtime_pm implementation Alan Stern
2011-03-01 19:36   ` Pierre Tardy
2011-03-01 19:57     ` Alan Stern
2011-03-01 20:06       ` Pierre Tardy
2011-03-01 20:30         ` Alan Stern
2011-03-01 21:07     ` Rafael J. Wysocki
2011-03-01 23:40       ` Pierre Tardy
2011-03-01 23:49         ` Rafael J. Wysocki [this message]
2011-03-02 15:12           ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201103020049.36902.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tardyp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox