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

Steffen Trumtrar s.trumtrar at pengutronix.de
Fri Mar 8 20:01:40 EST 2013


This RTC can wakeup the system. Register the device accordingly.

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

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)) {
-- 
1.8.2.rc2



More information about the devicetree-discuss mailing list