From: avinashphilip@ti.com (Philip Avinash)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] arm: gpmc: Low power transition support
Date: Wed, 23 Jan 2013 15:15:45 +0530 [thread overview]
Message-ID: <1358934346-16822-4-git-send-email-avinashphilip@ti.com> (raw)
In-Reply-To: <1358933176-12409-1-git-send-email-avinashphilip@ti.com>
With GPMC converted to platform driver recently, adds low power
transition support in driver itself.
Signed-off-by: Philip Avinash <avinashphilip@ti.com>
---
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 aed958a..af10617 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1357,9 +1357,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int gpmc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ omap3_gpmc_save_context();
+ clk_disable_unprepare(gpmc_l3_clk);
+ return 0;
+}
+
+static int gpmc_resume(struct platform_device *pdev)
+{
+ clk_prepare_enable(gpmc_l3_clk);
+ 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
.driver = {
.name = DEVICE_NAME,
.owner = THIS_MODULE,
--
1.7.9.5
next prev parent reply other threads:[~2013-01-23 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 9:26 [PATCH 0/4] LOW power sleep support for OMAP nand driver Philip Avinash
2013-01-23 9:26 ` [PATCH 1/4] arch: arm: gpmc: gpmc migration support Philip Avinash
2013-02-01 22:05 ` Tony Lindgren
2013-02-06 11:38 ` Philip, Avinash
2013-01-23 9:45 ` [PATCH 2/4] mtd: devices: elm: Low power transition support Philip Avinash
2013-01-23 9:45 ` Philip Avinash [this message]
2013-01-23 9:45 ` [PATCH 4/4] mtd: nand: omap2: " 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=1358934346-16822-4-git-send-email-avinashphilip@ti.com \
--to=avinashphilip@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).