linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] rtc: add a timestamp for year 0
@ 2019-10-07 13:47 Alexandre Belloni
  2019-10-07 13:47 ` [PATCH 02/10] rtc: ds1347: remove verbose messages Alexandre Belloni
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Alexandre Belloni @ 2019-10-07 13:47 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

A few RTCs handle dates from year 0 to year 9999. Add a timestamp even if
years before 1970 will probably never be used.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 include/linux/rtc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index df666cf29ef1..2680f9b2b119 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -160,6 +160,7 @@ struct rtc_device {
 #define to_rtc_device(d) container_of(d, struct rtc_device, dev)
 
 /* useful timestamps */
+#define RTC_TIMESTAMP_BEGIN_0000	-62167219200ULL /* 0000-01-01 00:00:00 */
 #define RTC_TIMESTAMP_BEGIN_1900	-2208988800LL /* 1900-01-01 00:00:00 */
 #define RTC_TIMESTAMP_BEGIN_2000	946684800LL /* 2000-01-01 00:00:00 */
 #define RTC_TIMESTAMP_END_2063		2966371199LL /* 2063-12-31 23:59:59 */
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-10-07 13:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 13:47 [PATCH 01/10] rtc: add a timestamp for year 0 Alexandre Belloni
2019-10-07 13:47 ` [PATCH 02/10] rtc: ds1347: remove verbose messages Alexandre Belloni
2019-10-07 13:47 ` [PATCH 03/10] rtc: ds1347: remove useless read Alexandre Belloni
2019-10-07 13:47 ` [PATCH 04/10] rtc: ds1347: simplify getting .driver_data Alexandre Belloni
2019-10-07 13:47 ` [PATCH 05/10] rtc: ds1347: mask ALM OUT when reading time Alexandre Belloni
2019-10-07 13:47 ` [PATCH 06/10] rtc: ds1347: convert to devm_rtc_allocate_device Alexandre Belloni
2019-10-07 13:47 ` [PATCH 07/10] rtc: ds1347: set range Alexandre Belloni
2019-10-07 13:47 ` [PATCH 08/10] rtc: ds1347: properly handle oscillator failures Alexandre Belloni
2019-10-07 13:47 ` [PATCH 09/10] rtc: ds1347: use regmap_update_bits Alexandre Belloni
2019-10-07 13:47 ` [PATCH 10/10] rtc: ds1347: handle century register Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).