Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278313 > unrolled thread
| Started by | Ludovic Desroches <ludovic.desroches@atmel.com> |
|---|---|
| First post | 2015-11-26 17:10 +0100 |
| Last post | 2015-11-26 17:40 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] mmc: sdhci at91: add PM support Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-26 17:10 +0100
Re: [PATCH v2] mmc: sdhci at91: add PM support Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-26 17:30 +0100
Re: [PATCH v2] mmc: sdhci at91: add PM support Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-26 17:40 +0100
| From | Ludovic Desroches <ludovic.desroches@atmel.com> |
|---|---|
| Date | 2015-11-26 17:10 +0100 |
| Subject | Re: [PATCH v2] mmc: sdhci at91: add PM support |
| Message-ID | <qz7ho-7tT-7@gated-at.bofh.it> |
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()
before sdhci_add_host() and calling pm_runtime_put_autosuspend() after?
>
> > +
> > return 0;
> >
> > clocks_disable_unprepare:
> > @@ -165,6 +228,7 @@ static int sdhci_at91_remove(struct platform_device *pdev)
> > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> > struct sdhci_at91_priv *priv = pltfm_host->priv;
> >
Regards
Ludovic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-11-26 17:30 +0100 |
| Message-ID | <qz7AK-7Bz-17@gated-at.bofh.it> |
| In reply to | #1278313 |
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.
[...]
Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ludovic Desroches <ludovic.desroches@atmel.com> |
|---|---|
| Date | 2015-11-26 17:40 +0100 |
| Message-ID | <qz7Kr-7Fr-37@gated-at.bofh.it> |
| In reply to | #1278325 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web