rtc: sun6i: Add support for broken-down alarm registers
authorAndre Przywara <andre.przywara@arm.com>
Fri, 11 Feb 2022 12:26:30 +0000 (12:26 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 23 Mar 2022 18:58:38 +0000 (19:58 +0100)
commit7878fec4b5445b708f5aa068bbc600e59308a165
treec75c2eb299b8c06a22fa69de51ce7801774439f6
parent648c151ab5d8b05bf1c539c92fcb080f475f20b9
rtc: sun6i: Add support for broken-down alarm registers

Newer versions of the Allwinner RTC, for instance as found in the H616
SoC, not only store the current day as a linear number, but also change
the way the alarm is handled: There are now two registers, that
explicitly store the wakeup time, in the same format as the current
time.

Add support for that variant by writing the requested wakeup time
directly into the registers, instead of programming the seconds left, as
the old SoCs required.

Reviewed by: Jernej Skrabec <jernej.skrabec@gmail.com>

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220211122643.1343315-6-andre.przywara@arm.com
drivers/rtc/rtc-sun6i.c