Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365911 > unrolled thread

[PATCH 7/8] rtc: m41t80: add wakealarm functionality

Started byMylène Josserand <mylene.josserand@free-electrons.com>
First post2016-03-29 09:00 +0200
Last post2016-03-29 09:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 7/8] rtc: m41t80: add wakealarm functionality Mylène Josserand   <mylene.josserand@free-electrons.com> - 2016-03-29 09:00 +0200

#1365911 — [PATCH 7/8] rtc: m41t80: add wakealarm functionality

FromMylène Josserand <mylene.josserand@free-electrons.com>
Date2016-03-29 09:00 +0200
Subject[PATCH 7/8] rtc: m41t80: add wakealarm functionality
Message-ID<rhVN7-2iO-3@gated-at.bofh.it>
To enable the wakealarm, the device must be able to wakeup.
This is done by setting the device wakeup capability to true with
'device_init_wakeup' function.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 drivers/rtc/rtc-m41t80.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 4255449..660a734 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -754,6 +754,8 @@ static int m41t80_probe(struct i2c_client *client,
 			m41t80_rtc_ops.read_alarm = m41t80_read_alarm;
 			m41t80_rtc_ops.set_alarm = m41t80_set_alarm;
 			m41t80_rtc_ops.alarm_irq_enable = m41t80_alarm_irq_enable;
+			/* Enable the wakealarm */
+			device_init_wakeup(&client->dev, true);
 		}
 	}
 
-- 
2.8.0.rc3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web