linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: balbi@ti.com
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Tim Niemeyer <tim.niemeyer@corscience.de>,
	Linux OMAP List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] gpio: omap-gpio: add support for pm_runtime autosuspend
Date: Tue, 30 Oct 2012 09:16:34 -0500	[thread overview]
Message-ID: <508FE142.2020408@ti.com> (raw)
In-Reply-To: <20121030070904.GB1978@arwen.pp.htv.fi>

Hi Felipe,

On 10/30/2012 02:09 AM, Felipe Balbi wrote:

...

>> its bit of an issue to take care. How do you ensure that GPIO
>> does idle on SOC idle C-state attempts in such cases. Today that
>> job is done by omap_gpio_[prepare/resume]_for_idle.
> 
> that's only there because we pm_runtime_get_sync() on gpio_request() and
> pm_runtime_put_sync() only on gpio_free().
> 
> That's the problem IMHO. And that's easy enough to 'fix':
> 
> call pm_runtime_mark_last_busy(); pm_runtime_put_sync_autosuspend();
> also on gpio_request() and pm_runtime_get_sync() on gpio_free().

Sounds like a good approach. I have been discussing with Kevin and I
need to look more at the resume handler as we are working around some
old issues in there and with this approach the resume following idle
will be delayed and we were not sure if there could be any implications
for omap2. I am hoping not, but we need to look into this.

So I am wondering if we should just take Tim's original proposal for now
and then I will look into improving this long term. I really need to
clean-up the suspend/resume stuff for gpio and so may be we can make
that a separate change. What do you think?

...

> The difficult part, IMHO, is to figure out what's a good autosuspend
> timeout to use. Some GPIO lines are used as IRQ lines on some devices,
> that means that the GPIO will be periodically triggered and, depending
> on our timeout, we will either loose IRQs or prevent power domain from
> idling. We could figure out a way to let board code to choose what it
> wants on a per-bank basis (maybe some extra DT attribute).

I have also been bending Kevin's ear on this, this week and we were
wondering if we should make the default 0 for now as this will have the
same behaviour that we have today but would allow Tim to customise via
the sysfs for his specific app.

Cheers
Jon

  reply	other threads:[~2012-10-30 14:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26  7:55 [PATCH] gpio: omap-gpio: add support for pm_runtime autosuspend Tim Niemeyer
2012-10-26  8:03 ` Felipe Balbi
2012-10-26 10:42   ` Tim Niemeyer
2012-10-26 11:42     ` Felipe Balbi
2012-10-26 13:19       ` Tim Niemeyer
2012-10-26 20:01         ` Felipe Balbi
2012-10-26 21:39           ` Jon Hunter
2012-10-27 10:58             ` Santosh Shilimkar
2012-10-29  8:52           ` Tim Niemeyer
2012-10-29  6:47         ` Santosh Shilimkar
2012-10-29  8:05           ` Felipe Balbi
2012-10-29  8:23             ` Santosh Shilimkar
2012-10-29 20:03               ` Felipe Balbi
2012-10-30  6:32                 ` Santosh Shilimkar
2012-10-30  7:09                   ` Felipe Balbi
2012-10-30 14:16                     ` Jon Hunter [this message]
2012-10-30 15:10                       ` Felipe Balbi
2012-10-31 10:15                         ` Jon Hunter
2012-10-31 10:15                           ` Felipe Balbi
2012-10-31 10:37                   ` Kevin Hilman
2012-10-31 11:05                     ` Santosh Shilimkar
2012-10-29  8:43           ` Tim Niemeyer

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=508FE142.2020408@ti.com \
    --to=jon-hunter@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tim.niemeyer@corscience.de \
    /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).