[PATCH v6 19/25] gpio/omap: cleanup prepare_for_idle and resume_after_idle
DebBarma, Tarun Kanti
tarun.kanti at ti.com
Wed Sep 7 01:17:20 EDT 2011
On Wed, Sep 7, 2011 at 5:23 AM, Kevin Hilman <khilman at ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti at ti.com> writes:
>
>> Cleanup omap2_gpio_prepare_for_idle() and omap2_gpio_resume_after_idle()
>> by moving most of the stuff to *_runtime_suspend() and *_runtime_resume().
>
> Why?
>
> (I know the answer, but it should be in the changelog.)
Ok.
>
>> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti at ti.com>
>> Signed-off-by: Charulatha V <charu at ti.com>
>> Reviewed-by: Santosh Shilimkar <santosh.shilimkar at ti.com>
>
> Also, as pointed out in an earlier patch, now that this is moved out of
> the idle path, where interrupts were known to be disabled, the register
> accesses in the runtime PM callbacks need to be protected by the
> spinlock just like they are in other parts of the driver.
Ok.
>
> [...]
>
>> @@ -1305,9 +1316,14 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
>> bank->base + bank->regs->fallingdetect);
>> __raw_writel(bank->context.dataout, bank->base + bank->regs->dataout);
>> }
>> +#else
>> +#define omap_gpio_runtime_suspend NULL
>> +#define omap_gpio_runtime_resume NULL
>> #endif
>>
>> static const struct dev_pm_ops gpio_pm_ops = {
>> + .runtime_suspend = omap_gpio_runtime_suspend,
>> + .runtime_resume = omap_gpio_runtime_resume,
>
> Please use SET_RUNTIME_PM_OPS() (see <linux/pm.h.)
Sure.
>
>> .suspend = omap_gpio_suspend,
>> .resume = omap_gpio_resume,
>> };
>
> Kevin
>
More information about the linux-arm-kernel
mailing list