From: Bryan Wu <cooloney@kernel.org>
To: a.zummo@towertech.it, rtc-linux@googlegroups.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
Sonic Zhang <sonic.zhang@analog.com>,
Bryan Wu <bryan.wu@analog.com>, Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 2/8] [Blackfin] RTC driver: Fix bug Only RTC interrupt can wake up deeper sleep core.
Date: Sun, 27 Jul 2008 14:38:21 +0800 [thread overview]
Message-ID: <1217140707-21263-3-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1217140707-21263-1-git-send-email-cooloney@kernel.org>
From: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/rtc/rtc-bfin.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index 48ada59..a568d29 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -430,6 +430,30 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+#ifdef PM_WAKEUP_SIC_IWR
+ struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
+#endif
+ bfin_rtc_reset(&pdev->dev);
+#ifdef PM_WAKEUP_SIC_IWR
+ bfin_write_RTC_SWCNT(10);
+ bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH);
+#endif
+ return 0;
+}
+
+static int bfin_rtc_resume(struct platform_device *pdev)
+{
+#ifdef PM_WAKEUP_SIC_IWR
+ struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
+ bfin_rtc_int_clear(rtc, RTC_ISTAT_STOPWATCH);
+#endif
+ return 0;
+}
+#endif
+
static struct platform_driver bfin_rtc_driver = {
.driver = {
.name = "rtc-bfin",
@@ -437,6 +461,10 @@ static struct platform_driver bfin_rtc_driver = {
},
.probe = bfin_rtc_probe,
.remove = __devexit_p(bfin_rtc_remove),
+#ifdef CONFIG_PM
+ .suspend = bfin_rtc_suspend,
+ .resume = bfin_rtc_resume,
+#endif
};
static int __init bfin_rtc_init(void)
--
1.5.6
next prev parent reply other threads:[~2008-07-27 6:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-27 6:38 [PATCH 0/8] Blackfin RTC Driver updates for 2.6.27 Bryan Wu
2008-07-27 6:38 ` [PATCH 1/8] [Blackfin] RTC driver: if we dont define irq_set_freq, the common rtc-dev layer will give us the same behavior of returning ENOTTY Bryan Wu
2008-07-27 6:38 ` Bryan Wu [this message]
2008-07-27 6:38 ` [PATCH 3/8] [Blackfin] RTC driver: add support for power management framework Bryan Wu
2008-07-27 6:38 ` [PATCH 4/8] [Blackfin] RTC driver: dont bother passing the rtc struct down to bfin_rtc_int_{set,clear} since it isnt needed (shaves off ~100bytes) Bryan Wu
2008-07-27 6:38 ` [PATCH 5/8] Blackfin RTC Driver: disable the write complete irq upon close Bryan Wu
2008-07-27 6:38 ` [PATCH 6/8] Blackfin RTC Driver: wait for the write complete interrupt complete before sleeping Bryan Wu
2008-07-27 6:38 ` [PATCH 7/8] Blackfin RTC Driver: convert PIE handling to irq_set_state() as pointed out by David Brownell Bryan Wu
2008-07-27 6:38 ` [PATCH 8/8] Blackfin RTC Driver: drop PIE/stopwatch code since the hardware can only do a max of 1HZ and this same functionality is provided by UIE Bryan Wu
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=1217140707-21263-3-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=bryan.wu@analog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=sonic.zhang@analog.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
all inboxes | Powered by JetHome®