linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Niemeyer <tim.niemeyer@corscience.de>
To: balbi@ti.com
Cc: Linux OMAP List <linux-omap@vger.kernel.org>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Jon Hunter <jon-hunter@ti.com>
Subject: Re: [PATCH] gpio: omap-gpio: add support for pm_runtime autosuspend
Date: Mon, 29 Oct 2012 09:52:08 +0100	[thread overview]
Message-ID: <1351500728.2194.69.camel@herbert.er.corscience.de> (raw)
In-Reply-To: <20121026200137.GC29548@arwen.pp.htv.fi>

Hello

Am Freitag, den 26.10.2012, 23:01 +0300 schrieb Felipe Balbi:
> Hi,
> 
> On Fri, Oct 26, 2012 at 03:19:13PM +0200, Tim Niemeyer wrote:
> > Adds support for configuring the omap-gpio driver use autosuspend for
> > runtime power management. This can reduce the latency in using it by
> > not suspending the device immediately on idle. If another access takes
> > place before the autosuspend timeout (2 secs), the call to resume the
> > device can return immediately saving some save/ restore cycles.
> > 
> > This removes also the bank->mod_usage counter, because this is already
> > handled in pm_runtime.
> > 
> > I use a gpio to monitor a spi transfer which occurs every 250µs. The
> > suspend overhead is to high, so almost every second transfer is lost.
> > This patch fixes that.
> > 
> > Signed-off-by: Tim Niemeyer <tim.niemeyer@corscience.de>
> > ---
> >  drivers/gpio/gpio-omap.c |   81 ++++++++++++++++++++++++---------------------
> >  1 files changed, 43 insertions(+), 38 deletions(-)
> > 
> > diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> > index 94cbc84..708d5a9 100644
> > --- a/drivers/gpio/gpio-omap.c
> > +++ b/drivers/gpio/gpio-omap.c
> > @@ -31,6 +31,7 @@
> >  #include <asm/mach/irq.h>
> >  
> >  #define OFF_MODE	1
> > +#define GPIO_AUTOSUSPEND_TIMEOUT                2000
> 
> something just hit me... If you keep timeout at 2000 ms and you hook
> this up to an IRQ line, it's very unlikely GPIO will ever sleep.
> 
> Why did you choose 2000 ms ? Arbitrary value ?
Got it from the spi driver (27b5284cfbe187732ebb184b03ea693f44837f9d).
I have no problem with reducing this. As i don't know how much
power-overhead the suspend needs, what do you think is a good value in
terms of power-saving?

-- 
Tim Niemeyer

Corscience GmbH & Co. KG
Henkestr. 91
D-91052 Erlangen
Germany

e-mail: tim.niemeyer@corscience.de
Internet: www.corscience.de

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-10-29  8:51 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 [this message]
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
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=1351500728.2194.69.camel@herbert.er.corscience.de \
    --to=tim.niemeyer@corscience.de \
    --cc=balbi@ti.com \
    --cc=jon-hunter@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.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).