From: Kevin Hilman <khilman@linaro.org>
To: Philip Avinash <avinashphilip@ti.com>
Cc: afzal@ti.com, linux@arm.linux.org.uk, tony@atomide.com,
nsekhar@ti.com, linux-kernel@vger.kernel.org, hvaibhav@ti.com,
gururaja.hebbar@ti.com, linux-mtd@lists.infradead.org,
linux-omap@vger.kernel.org, dwmw2@infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/3] arm: gpmc: Low power transition support
Date: Tue, 19 Feb 2013 07:27:10 -0800 [thread overview]
Message-ID: <87bobgz5m9.fsf@linaro.org> (raw)
In-Reply-To: <1361278219-23108-3-git-send-email-avinashphilip@ti.com> (Philip Avinash's message of "Tue, 19 Feb 2013 18:20:18 +0530")
Philip Avinash <avinashphilip@ti.com> writes:
> With GPMC converted to platform driver recently, adds low power
> transition support in driver itself.
>
> Signed-off-by: Philip Avinash <avinashphilip@ti.com>
> ---
> Changes since v1:
> Module disable & enable added using pm_runtime support.
>
> arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index b1cd6c1..cc57988 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -1361,9 +1361,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev)
> return 0;
> }
>
> +#ifdef CONFIG_PM
This should be CONFIG_PM_SLEEP for suspend/resume specific stuff.
> +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state)
> +{
> + omap3_gpmc_save_context();
> + pm_runtime_put_sync(&pdev->dev);
> + return 0;
> +}
> +
> +static int gpmc_resume(struct platform_device *pdev)
> +{
> + pm_runtime_get_sync(&pdev->dev);
> + omap3_gpmc_restore_context();
> + return 0;
> +}
> +#endif
> +
> static struct platform_driver gpmc_driver = {
> .probe = gpmc_probe,
> .remove = __devexit_p(gpmc_remove),
> +#ifdef CONFIG_PM
> + .suspend = gpmc_suspend,
> + .resume = gpmc_resume,
> +#endif
These are the legacy PM operations, you need to use the ones in the
drivers struct dev_pm_ops.
> .driver = {
> .name = DEVICE_NAME,
> .owner = THIS_MODULE,
Kevin
next prev parent reply other threads:[~2013-02-19 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 12:50 [PATCH v3 0/3] suspend/resume support for OMAP nand driver Philip Avinash
2013-02-19 12:50 ` [PATCH v3 1/3] arm: gpmc: Converts GPMC driver to pm_runtime capable Philip Avinash
2013-02-19 12:50 ` [PATCH v3 2/3] arm: gpmc: Low power transition support Philip Avinash
2013-02-19 15:27 ` Kevin Hilman [this message]
2013-02-19 12:50 ` [PATCH v3 3/3] mtd: devices: elm: " Philip Avinash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bobgz5m9.fsf@linaro.org \
--to=khilman@linaro.org \
--cc=afzal@ti.com \
--cc=avinashphilip@ti.com \
--cc=dwmw2@infradead.org \
--cc=gururaja.hebbar@ti.com \
--cc=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nsekhar@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox