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
Reviewed-by: Santosh Shilimkar
---
drivers/gpio/gpio-omap.c | 8
Tarun Kanti DebBarma writes:
> 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
> Reviewed-by: Santosh Sh
[...]
>> + /*
>> + * 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)) {
>
> All of the IS_ERR_VALUE() usage is wrong here. You're checking
[...]
>>
>> +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
We can use following macro to initialize .suspend and .resume callbacks.
But
On Fri, Sep 9, 2011 at 6:02 PM, DebBarma, Tarun Kanti
wrote:
> [...]
>>>
>>> +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
> We c
"DebBarma, Tarun Kanti" 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
> We can use following macro to in
On Fri, Sep 9, 2011 at 11:34 PM, Kevin Hilman wrote:
> "DebBarma, Tarun Kanti" writes:
>
>> [...]
+static const struct dev_pm_ops gpio_pm_ops = {
+ .suspend = omap_gpio_suspend,
+ .resume = omap_gpio_resume,
+};
>>>
>>> Please use SE
"DebBarma, Tarun Kanti" writes:
> On Fri, Sep 9, 2011 at 11:34 PM, Kevin Hilman wrote:
>> "DebBarma, Tarun Kanti" writes:
>>
>>> [...]
>
> +static const struct dev_pm_ops gpio_pm_ops = {
> + .suspend = omap_gpio_suspend,
> + .resume = omap_