mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Feng Tang <feng.tang@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, alan@linux.intel.com,
	hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
	feng.tang@intel.com
Subject: [tip:x86/platform] x86, mrst: Add explanation for using 1960 as the year offset for vrtc
Date: Wed, 17 Nov 2010 12:57:44 GMT	[thread overview]
Message-ID: <tip-d3e1884bc585a43674d2cb0d3f0aeeb0ae43bc04@git.kernel.org> (raw)
In-Reply-To: <20101117121050.9998.89348.stgit@localhost.localdomain>

Commit-ID:  d3e1884bc585a43674d2cb0d3f0aeeb0ae43bc04
Gitweb:     http://git.kernel.org/tip/d3e1884bc585a43674d2cb0d3f0aeeb0ae43bc04
Author:     Feng Tang <feng.tang@intel.com>
AuthorDate: Wed, 17 Nov 2010 12:11:24 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 17 Nov 2010 13:53:46 +0100

x86, mrst: Add explanation for using 1960 as the year offset for vrtc

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>
LKML-Reference: <20101117121050.9998.89348.stgit@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 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)
 {

      reply	other threads:[~2010-11-17 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Feng Tang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-d3e1884bc585a43674d2cb0d3f0aeeb0ae43bc04@git.kernel.org \
    --to=feng.tang@intel.com \
    --cc=alan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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