On Tue, 8 Oct 2024, Geert Uytterhoeven wrote:
Hi Finn,
On Tue, Oct 8, 2024 at 12:43 AM Finn Thain <fthain@xxxxxxxxxxxxxx> wrote:
Instead of hard-coded values and ifdefs, store the year offset in the
platform_data struct.
Tested-by: Daniel Palmer <daniel@xxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
Thanks for your patch!
Thanks for your review.
--- a/include/linux/rtc/m48t59.h
+++ b/include/linux/rtc/m48t59.h
@@ -56,6 +56,9 @@ struct m48t59_plat_data {
void __iomem *ioaddr;
/* offset to RTC registers, automatically set according to the type */
unsigned int offset;
+
+ /* YY digits (in RTC) are offset, i.e. year is 1900 + yy_offset + YY */
+ time64_t yy_offset;
time64_t sounds like overkill to me...
A vestige of an earlier experiment. Sorry about that. I shall send v3.