[PATCH v6 17/25] gpio/omap: use pm-runtime framework
DebBarma, Tarun Kanti
tarun.kanti at ti.com
Fri Sep 9 14:55:46 EDT 2011
On Fri, Sep 9, 2011 at 11:34 PM, Kevin Hilman <khilman at ti.com> wrote:
> "DebBarma, Tarun Kanti" <tarun.kanti at ti.com> writes:
>
>> [...]
>>>>
>>>> +static const struct dev_pm_ops gpio_pm_ops = {
>>>> + .suspend = omap_gpio_suspend,
>>>> + .resume = omap_gpio_resume,
>>>> +};
>>>
>>> Please use SET_SYSTEM_SLEEP_PM_OPS(). See <linux/pm.h>
>> We can use following macro to initialize .suspend and .resume callbacks.
>> But how do we initialize .runtime_suspend and .runtime_resume callbacks?
>>
>> #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
>> const struct dev_pm_ops name = { \
>> SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
>> }
>>
>> Do we have something similar to following where we can assign separate
>> pair of callbacks?
>
> SET_RUNTIME_PM_OPS()
Yes, I have done this way:
static const struct dev_pm_ops gpio_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(omap_gpio_suspend, omap_gpio_resume)
SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume,
NULL)
};
--
Tarun
>
> Kevin
>
More information about the linux-arm-kernel
mailing list