Files
linux/drivers/rtc
AngeloGioacchino Del Regno 34bbdc12d0 rtc: mt6359: Add RTC hardware range and add support for start-year
Add the RTC hardware range parameters to enable the possibility
of using the `start-year` devicetree property which, if present,
will set the start_secs parameter by overriding the defaults
that this driver is setting;

To keep compatibility with (hence have the same date/time reading
as) the old behavior, set:
 - range_min to 1900-01-01 00:00:00
 - range_max to 2027-12-31 23:59:59 (HW year max range is 0-127)
 - start_secs defaulting to 1968-01-02 00:00:00

Please note that the oddness of starting from January 2nd is not
a hardware quirk and it's done only to get the same date/time
reading as an RTC which time was set before this commit.

Also remove the RTC_MIN_YEAR_OFFSET addition and subtraction in
callbacks set_time() and read_time() respectively, as now this
is already done by the API.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://lore.kernel.org/r/20240923100010.97470-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-11-11 22:00:34 +01:00
..
2024-03-08 12:05:10 +01:00
2024-09-27 08:18:43 -07:00
2024-01-18 01:00:21 +01:00
2023-10-15 23:01:08 +02:00
2024-08-28 21:54:51 +01:00
2024-09-22 01:17:10 +02:00
2024-11-11 11:47:58 +01:00
2024-05-07 23:40:10 +02:00
2023-04-26 11:40:26 +01:00
2024-09-12 00:33:24 +02:00