From: Kevin Hilman <khilman@linaro.org>
To: Russ Dill <Russ.Dill@ti.com>
Cc: linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Tarun Kanti DebBarma <tarun.kanti@ti.com>,
Charulatha V <charu@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: Re: omap2_gpio_prepare_for_idle not functioning in suspend
Date: Mon, 11 Feb 2013 07:29:46 -0800 [thread overview]
Message-ID: <87pq06yil1.fsf@linaro.org> (raw)
In-Reply-To: <CA+Bv8XaWKob_t-S7geuYZveVtxQNa2Bg2awRt49gZ0UQW3nK+g@mail.gmail.com> (Russ Dill's message of "Sun, 10 Feb 2013 16:39:14 -0800")
Hi Russ,
Russ Dill <Russ.Dill@ti.com> writes:
> After the gpio-omap runtime PM changes, I noticed that the
> omap2_gpio_prepare_for_idle/omap2_gpio_resume_after_idle functions are
> a NOP in the case of suspend.
>
> void omap2_gpio_prepare_for_idle(int pwr_mode)
> {
> struct gpio_bank *bank;
>
> list_for_each_entry(bank, &omap_gpio_list, node) {
> if (!bank->mod_usage)
> continue;
>
> bank->power_mode = pwr_mode;
>
> pm_runtime_put_sync_suspend(bank->dev);
> }
> }
>
> void omap2_gpio_resume_after_idle(void)
> {
> struct gpio_bank *bank;
>
> list_for_each_entry(bank, &omap_gpio_list, node) {
> if (!bank->mod_usage)
> continue;
>
> pm_runtime_get_sync(bank->dev);
> }
> }
>
> (called from omap_pm_enter->omap3_pm_suspend->omap_sram_idle)
>
> At the point that platform_suspend_ops.enter is called,
> dpm_suspend_end has already been called which disables runtime_pm.
> During a suspend/resume where power is lost to certain GPIO banks, the
> context will not be restored.
Did you actually observe context not being restored, or is this an
observation by looking at the code?
The PM domain layer (implemented in omap_device) is supposed to be
handling the case where runtime PM has been disabled by the PM core.
Specifically, check the 'noirq' hooks in the omap_device PM domain.
These check whether omap_devices are runtime_suspended, and
runtime_suspends them if they are not. Then during resume, the
resume_noirq hook will runtime resume them if they were "forcibly"
runtime suspended during the noirq phase.
That being said, there may have been some recent PM core changes that
have caused this not to work anymore, so I'd be very curious exactly how
to reproduce this.
Thanks,
Kevin
prev parent reply other threads:[~2013-02-11 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 0:39 omap2_gpio_prepare_for_idle not functioning in suspend Russ Dill
2013-02-11 15:29 ` Kevin Hilman [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=87pq06yil1.fsf@linaro.org \
--to=khilman@linaro.org \
--cc=Russ.Dill@ti.com \
--cc=charu@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
--cc=tarun.kanti@ti.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).