]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: rv3029: fix alarm support
authorMylène Josserand <mylene.josserand@free-electrons.com>
Tue, 3 May 2016 09:54:36 +0000 (11:54 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 21 May 2016 15:06:56 +0000 (17:06 +0200)
commitdc492e866a997b3df2a551fa772d6887a19e53b8
tree3a91ab494b4129aa92ea1ad5460f47dfe0cd2d6e
parentabe2f551efc65760d61668ad6fb511bf834082dc
rtc: rv3029: fix alarm support

The RTC RV3029 handles different types of alarms : seconds, minutes, ...
These alarms can be enabled or disabled individually using an AE_x bit
which is the last bit (BIT(7)) on each alarm registers.

To prepare the alarm IRQ support, the current code enables all the alarm
types by setting each AE_x to 1.
It also fixes others alarms issues :
   - month and weekday errors : it was performing -1 instead of +1.
   - wrong use of bit mask with bin2bcd

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-rv3029c2.c