]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
authorChen-Yu Tsai <wens@csie.org>
Tue, 4 Jun 2019 04:23:36 +0000 (12:23 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 20 Jun 2019 19:52:05 +0000 (21:52 +0200)
commit6f066ca70211cdf13cff76bc1b1147203d733c8a
treefc23eb6b8221790ee5140561b351536180e5119b
parentce300dfa1792c29aa56d150db07b2109aa5edc59
rtc: pcf8563: Clear event flags and disable interrupts before requesting irq

Besides the alarm, the PCF8563 also has a timer triggered interrupt.
In cases where the previous system left the timer and interrupts on,
or somehow the bits got enabled, the interrupt would keep triggering
as the kernel doesn't know about it.

Clear both the alarm and timer event flags, and disable the interrupts,
before requesting the interrupt line.

Fixes: 5287febdde4d ("drivers/rtc/rtc-pcf8563.c: add alarm support")
Fixes: 72377092cfd2 ("rtc: pcf8563: clear expired alarm at boot time")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf8563.c