]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1e75a1c49d89b20891802e89fb52f61d7444a02c
treec75c2eb299b8c06a22fa69de51ce7801774439f6
parentc192ea0738b67861887eb2954098e8b210aba223
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