Patchwork [v2,5/9] rtc: stmp3xxx: enable wakeup functionality

login
register
mail settings
Submitter Steffen Trumtrar
Date March 8, 2013, 9:01 a.m.
Message ID <1362733304-23037-6-git-send-email-s.trumtrar@pengutronix.de>
Download mbox | patch
Permalink /patch/226053/
State New
Headers show

Comments

Steffen Trumtrar - March 8, 2013, 9:01 a.m.
This RTC can wakeup the system. Register the device accordingly.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 drivers/rtc/rtc-stmp3xxx.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
index d2283c5..cd844ec 100644
--- a/drivers/rtc/rtc-stmp3xxx.c
+++ b/drivers/rtc/rtc-stmp3xxx.c
@@ -370,6 +370,9 @@  static int stmp3xxx_rtc_probe(struct platform_device *pdev)
 			STMP3XXX_RTC_CTRL_ALARM_IRQ_EN,
 			rtc_data->io + STMP3XXX_RTC_CTRL_CLR);
 
+	/* this RTC can wake up the system */
+	device_init_wakeup(&pdev->dev, true);
+
 	rtc_data->rtc = rtc_device_register(pdev->name, &pdev->dev,
 				&stmp3xxx_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc_data->rtc)) {