aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMylène Josserand <mylene.josserand@free-electrons.com>2016-03-29 08:56:04 +0200
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-05-20 12:33:51 +0200
commit3726a21833c9c96255735bddb5dacc8eacbff3ef (patch)
tree0e989f2014ee0126a1199e868582a4443ca4f812
parent9c6dfed92c3e86d6f84780625c0595ba56d03986 (diff)
rtc: m41t80: add wakealarm functionality
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r--drivers/rtc/rtc-m41t80.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index c724738..5706e99 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -758,6 +758,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);
}
}