Re: [PATCH v3 18/20] GPIO: OMAP: Use PM runtime framework

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

 



On 07/20/2011 12:28 PM, DebBarma, Tarun Kanti wrote:
[...]
   From this patch it seems that the GPIO module is kept active as long as
one of its GPIOs is requested. This is not optimal.
Yes, but...


The GPIO needs to be active only when accessing its registers e.g.
during gpio_get or gpio_set. The rest of the time it can be suspended.
A GPIO module would typically be used by multiple client drivers.
However, the clock control is common for all GPIO pins within the module.
So clocks can't be turned-off/on without negatively impacting present users.

Why not.

Let's say GPIO 1 and 2 belong to the same GPIO module.
Driver A uses GPIO 1 and driver B uses GPIO 2.
A is just blinking an LED every second whereas B uses GPIO 2 as input.

both drivers will keep the GPIOs requested as long as they are loaded.
Why can't you turn off the clocks when nobody is accessing GPIO registers?

In your current implementation, the GPIO module will never go idle.

cheers,
-roger
--
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