]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtc: interface: Ensure alarm irq is enabled when UIE is enabled
authorEsben Haabendal <esben@geanix.com>
Fri, 16 May 2025 07:23:39 +0000 (09:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:16 +0000 (16:23 +0200)
commit545c131a658ab4e7bff492a33e78c7d236144a3c
treecf06d9a7287c84ae9845abad39281ba826901934
parent1ca1d3f733d63ee35a6caf7f3335edd5fa382a73
rtc: interface: Ensure alarm irq is enabled when UIE is enabled

commit 9db26d5855d0374d4652487bfb5aacf40821c469 upstream.

When setting a normal alarm, user-space is responsible for using
RTC_AIE_ON/RTC_AIE_OFF to control if alarm irq should be enabled.

But when RTC_UIE_ON is used, interrupts must be enabled so that the
requested irq events are generated.
When RTC_UIE_OFF is used, alarm irq is disabled if there are no other
alarms queued, so this commit brings symmetry to that.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250516-rtc-uie-irq-fixes-v2-5-3de8e530a39e@geanix.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/interface.c