[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130114070855.GA21994@avionic-0098.adnet.avionic-design.de>
Date: Mon, 14 Jan 2013 08:08:56 +0100
From: Thierry Reding <thierry.reding@...onic-design.de>
To: Philip Avinash <avinashphilip@...com>
Cc: linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
nsekhar@...com, gururaja.hebbar@...com
Subject: Re: [PATCH 1/2] pwm: pwm-tiehrpwm: Low power sleep support
On Thu, Jan 10, 2013 at 06:33:43PM +0530, Philip Avinash wrote:
[...]
> diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
[...]
> +static int ehrpwm_pwm_suspend(struct device *dev)
> +{
> + struct ehrpwm_pwm_chip *pc = dev_get_drvdata(dev);
> +
> + ehrpwm_pwm_context_save(pc);
> + pm_runtime_put_sync(dev);
> + return 0;
> +}
> +
> +static int ehrpwm_pwm_resume(struct device *dev)
> +{
> + struct ehrpwm_pwm_chip *pc = dev_get_drvdata(dev);
> +
> + pm_runtime_get_sync(dev);
> + ehrpwm_pwm_context_restore(pc);
> + return 0;
> +}
According to Documentation/power/runtime_pm.txt, the PM core runs the
pm_runtime_get_noresume() and pm_runtime_put_sync() before executing the
.suspend() and .resume() callbacks. Are you sure you need to call them
here explicitly?
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists