[PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-16 Thread Tarun Kanti DebBarma
Call runtime pm APIs pm_runtime_get_sync() and pm_runtime_put_sync() for enabling/disabling clocks appropriately. Remove syscore_ops and instead use dev_pm_ops now. Signed-off-by: Charulatha V Signed-off-by: Tarun Kanti DebBarma --- drivers/gpio/gpio-omap.c | 100 ++

Re: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-16 Thread Todd Poynor
On Sat, Jul 16, 2011 at 01:45:50PM +0530, Tarun Kanti DebBarma wrote: > Call runtime pm APIs pm_runtime_get_sync() and pm_runtime_put_sync() > for enabling/disabling clocks appropriately. Remove syscore_ops and > instead use dev_pm_ops now. > ... > @@ -481,6 +483,22 @@ static int omap_gpio_request

RE: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-20 Thread DebBarma, Tarun Kanti
[...] > > > > + /* > > +* If this is the first gpio_request for the bank, > > +* enable the bank module. > > +*/ > > + if (!bank->mod_usage) { > > + if (IS_ERR_VALUE(pm_runtime_get_sync(bank->dev) < 0)) { > > + dev_err(bank->dev, "%s: GPIO bank %d " > > +

RE: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-27 Thread DebBarma, Tarun Kanti
Todd, [...] > > + /* Initialize the gpio bank registers to init time value */ > > + omap_gpio_mod_init(bank); > > omap_gpio_mod_init calls mpuio_init calls platform_driver_register > which can't be called in an IRQs off and spinlocked atomic context, > for example, device_priva

Re: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-28 Thread Todd Poynor
On Wed, Jul 27, 2011 at 05:14:58PM +0530, DebBarma, Tarun Kanti wrote: ... > > omap_gpio_mod_init calls mpuio_init calls platform_driver_register > > which can't be called in an IRQs off and spinlocked atomic context, ... > I have isolated mpuio_init() from omap_gpio_mod_init(). > mpuio_init() is n

RE: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-28 Thread DebBarma, Tarun Kanti
Todd, [...] > > > omap_gpio_mod_init calls mpuio_init calls platform_driver_register > > > which can't be called in an IRQs off and spinlocked atomic context, > ... > > I have isolated mpuio_init() from omap_gpio_mod_init(). > > mpuio_init() is now called once in omap_gpio_probe(). > > Looking at

Re: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-28 Thread Todd Poynor
On Thu, Jul 28, 2011 at 03:05:29PM +0530, DebBarma, Tarun Kanti wrote: > > ... > > Looking at omap_gpio_mod_init() it seems like much of its processing > > could probably be done once at probe time (or at pm_runtime_get_sync > > time) as well, namely setting the IRQ enable masks. > This must be cal

RE: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-29 Thread DebBarma, Tarun Kanti
[...] > > > Looking at omap_gpio_mod_init() it seems like much of its processing > > > could probably be done once at probe time (or at pm_runtime_get_sync > > > time) as well, namely setting the IRQ enable masks. > > This must be called at the beginning of bank access to get reset state. > > Other

RE: [PATCH v4 REPOST 18/20] gpio/omap: use pm-runtime framework

2011-07-29 Thread DebBarma, Tarun Kanti
[...] > To be clear, it seems like resetting irqenable settings should be a > one-time action at probe time. The power management actions such as Looking at it again, well we could probably avoid *_mod_init() in request. I will test and confirm. Thanks. -- Tarun [...] > > Anyhow, mainly wanted to