rtc: m41t80: add wakealarm functionality
authorMylène Josserand <mylene.josserand@free-electrons.com>
Tue, 29 Mar 2016 06:56:04 +0000 (08:56 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 20 May 2016 10:33:51 +0000 (12:33 +0200)
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>
drivers/rtc/rtc-m41t80.c

index c7247386441863faffb3d20b2ba02e828e7410ca..5706e99853a3c315e9b9b4e3297841533dc80ccc 100644 (file)
@@ -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);
                }
        }