From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Ludovic Desroches <ludovic.desroches@atmel.com>
Subject: Re: [PATCH v2] mmc: sdhci at91: add PM support
Date: Thu, 26 Nov 2015 17:32:21 +0100 [thread overview]
Message-ID: <20151126163221.GH8908@odux.rfo.atmel.com> (raw)
In-Reply-To: <CAPDyKFpShib_OsB6HB7_5PNEkkMpWq6+LwaD0-AH=QqhzpOB3A@mail.gmail.com>
On Thu, Nov 26, 2015 at 05:24:40PM +0100, Ulf Hansson wrote:
> On 26 November 2015 at 17:07, Ludovic Desroches
> <ludovic.desroches@atmel.com> wrote:
> > On Tue, Nov 10, 2015 at 12:12:30PM +0100, Ulf Hansson wrote:
> >> On 10 November 2015 at 11:36, Ludovic Desroches
> >> <ludovic.desroches@atmel.com> wrote:
> >> > Add runtime PM support and use runtime_force_suspend|resume() for system
> >> > PM.
> >> >
> >
> > [...]
> >
> >> > static int sdhci_at91_probe(struct platform_device *pdev)
> >> > {
> >> > const struct of_device_id *match;
> >> > @@ -148,6 +206,11 @@ static int sdhci_at91_probe(struct platform_device *pdev)
> >> > if (ret)
> >> > goto clocks_disable_unprepare;
> >> >
> >> > + pm_runtime_set_active(&pdev->dev);
> >> > + pm_runtime_enable(&pdev->dev);
> >> > + pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
> >> > + pm_runtime_use_autosuspend(&pdev->dev);
> >>
> >> Move these four runtime PM calls above sdhci_add_host(), as after that
> >> point the host is used and thus runtime PM operations starts.
> >
> > Sadly I have discovered a bit late it is not working when doing this
> > because the controller has been suspended before doing the
> > sdhci_add_host().
> >
> > What is the right way to fix it? Calling pm_runtime_get_noresume()
>
> I would do that before pm_runtime_enable().
>
> > before sdhci_add_host() and calling pm_runtime_put_autosuspend() after?
>
> Yes. Sorry for not spotting this before.
No problem, I am faulty too, it was not so trivial!
I am sending the fix. Thanks
Regards
Ludovic
prev parent reply other threads:[~2015-11-26 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 10:36 Ludovic Desroches
2015-11-10 11:12 ` Ulf Hansson
2015-11-10 13:21 ` Ludovic Desroches
2015-11-26 16:07 ` Ludovic Desroches
2015-11-26 16:24 ` Ulf Hansson
2015-11-26 16:32 ` Ludovic Desroches [this message]
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=20151126163221.GH8908@odux.rfo.atmel.com \
--to=ludovic.desroches@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=ulf.hansson@linaro.org \
/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
all inboxes | Powered by JetHome®