mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86, mrst: add explalation for using 1960 as the year offset for vrtc device
@ 2010-11-17 12:11 Alan Cox
  2010-11-17 12:57 ` [tip:x86/platform] x86, mrst: Add explanation for using 1960 as the year offset for vrtc tip-bot for Feng Tang
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2010-11-17 12:11 UTC (permalink / raw)
  To: linux-kernel, x86

From: Feng Tang <feng.tang@intel.com>

Explain the reason for the apparently odd choice of year offset so we don't
get more questions about it.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/rtc/rtc-mrst.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 67b6be2..bcd0cf6 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -66,7 +66,11 @@ static inline int is_intr(u8 rtc_intr)
  * rtc_time's year contains the increment over 1900, but vRTC's YEAR
  * register can't be programmed to value larger than 0x64, so vRTC
  * driver chose to use 1960 (1970 is UNIX time start point) as the base,
- * and does the translation at read/write time
+ * and does the translation at read/write time.
+ *
+ * Why not just use 1970 as the offset? it's because using 1960 will
+ * make it consistent in leap year setting for both vrtc and low-level
+ * physical rtc devices.
  */
 static int mrst_read_time(struct device *dev, struct rtc_time *time)
 {


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

end of thread, other threads:[~2010-11-17 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17 12:11 [PATCH] x86, mrst: add explalation for using 1960 as the year offset for vrtc device Alan Cox
2010-11-17 12:57 ` [tip:x86/platform] x86, mrst: Add explanation for using 1960 as the year offset for vrtc tip-bot for Feng Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome