rtc: at91rm9200: fix reading alarm value
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 10 Nov 2017 08:59:31 +0000 (09:59 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 10 Nov 2017 15:24:32 +0000 (16:24 +0100)
commiteaa1dc7ba18db14842fbee9c57e71d28ae1c407d
treec433d613ad7381be86260794721e85dd9d031216
parent275ebe2b8fcab4ba4a774e6ee1e3e28d495cff3e
rtc: at91rm9200: fix reading alarm value

When alarm value is read at boot time, at91_alarm_year is not yet set to
the proper value so the year is always set to 1900.

This results in that kind of message at boot:
rtc rtc0: invalid alarm value: 1900-1-14 2:11:39

There is no way to recover from that as the alarm is now only read when
booting.

Instead, rely on the rtc core to figure out the proper year.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-at91rm9200.c