rtc: rzn1: implement one-second accuracy for alarms
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 5 Mar 2025 10:08:16 +0000 (11:08 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 17 Mar 2025 22:25:58 +0000 (23:25 +0100)
commiteea7791e00f33a2a7a0c56479805bf1642ba378d
tree7cbbdc1665847fc1a3734d92ebddc49791cd7d7d
parent0a243de9d009087fc99f591faa2c494ff5907fcd
rtc: rzn1: implement one-second accuracy for alarms

The hardware alarm only supports one-minute accuracy which is coarse and
disables UIE usage. Use the 1-second interrupt to achieve per-second
accuracy. It is activated once we hit the per-minute alarm. The new
feature is optional. When there is no 1-second interrupt, old behaviour
with per-minute accuracy is used as before. With this feature, all tests
of 'rtctest' are successfully passed.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250305101038.9933-2-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rzn1.c