rtc: ds1343: rework interrupt handling
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 19 Oct 2019 20:49:40 +0000 (22:49 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 19 Oct 2019 20:56:09 +0000 (22:56 +0200)
commit0680a6cdabf0629ab276d4d78b61c4761d15cb28
tree34a9cbe61d4c3298b2961b198ea61c04c7ebe2f6
parenta986429095df39e7a5b85a53b1e71ee8d07d3390
rtc: ds1343: rework interrupt handling

Rework the interrupt handling to avoid caching the values as the core is
already doing that. The core also always ensures the rtc_time passed for
the alarm is fully populated.

The only trick is in read_alarm where status needs to be read before the
alarm registers to ensure the potential irq is not cleared.

Link: https://lore.kernel.org/r/20191019204941.6203-8-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1343.c