Re: [PATCH] gpio: omap-gpio: add support for pm_runtime autosuspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/26/2012 03:01 PM, Felipe Balbi wrote:
> 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@xxxxxxxxxxxxx>
>> ---
>>  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 ?

It does seem quite large. I wonder if the default timeout should be
something much smaller and then users can set the timeout needed for
their specific application via the sysfs.

By the way, it appears that I keep getting unsubscribed from linux-omap
mailing list and I only saw this because you copied me. Thanks Felipe!
Can you bounce the thread to me?

Also if anyone knows why I could be getting unsubscribed let me know.
May be my emails have a bad signal to noise ratio :-(

Cheers
Jon



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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux