rtc: Disable alarm irq if alarm time is in the past

If device is boot up by rtc alarm, the alarm irq will still be
enabled and the alarm time is smaller than current rtc time before
any alarm is set or canceled. If device is powered off now, it will
boot up automatically as the alarm irq is enabled.

So disable alarm irq if alarm is enabled and alarm time is in the
past.

CRs-Fixed: 2109666
Change-Id: Ie60bd1222a400cd45a6c5a385faa70190fbe7e3c
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
1 file changed