diff options
author | Finn Thain <fthain@linux-m68k.org> | 2024-11-13 09:32:15 +1100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2024-11-18 14:31:57 +0100 |
commit | a06e4a93067cd8f55a74638d45146ddde76574f2 (patch) | |
tree | 1b489999a3c90db45d91560239a72fc636d59735 /include/linux/rtc | |
parent | fb1283bfa25e65c2d1e3c916b3d67af6609573e9 (diff) |
rtc: m48t59: Use platform_data struct for year offset value
Instead of hard-coded values and ifdefs, store the year offset in the
platform_data struct.
Tested-by: Daniel Palmer <daniel@0x0f.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/665c3526184a8d0c4a6373297d8e7d9a12591d8b.1731450735.git.fthain@linux-m68k.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc')
-rw-r--r-- | include/linux/rtc/m48t59.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/rtc/m48t59.h b/include/linux/rtc/m48t59.h index 9465d5405fe2..373ba77071c6 100644 --- 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 */ + int yy_offset; }; #endif /* _LINUX_RTC_M48T59_H_ */ |