Skip to content

Commit

Permalink
x86, mrst: Add explanation for using 1960 as the year offset for vrtc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Feng Tang authored and Thomas Gleixner committed Nov 17, 2010
1 parent ad02519 commit d3e1884
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/rtc/rtc-mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit d3e1884

Please sign in to comment.