linux-mips
[Top] [All Lists]

Re: [RFC] generic MIPS RTC driver

To: jsun@mvista.com
Subject: Re: [RFC] generic MIPS RTC driver
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Mon, 12 Nov 2001 10:45:19 +0900 (JST)
Cc: linux-mips@oss.sgi.com
In-reply-to: <20011110231746.B4342@mvista.com>
Organization: TOSHIBA Personal Computer System Corporation
References: <20011110231746.B4342@mvista.com>
Sender: owner-linux-mips@oss.sgi.com
>>>>> On Sat, 10 Nov 2001 23:17:46 -0800, Jun Sun <jsun@mvista.com> said:
jsun> For many MIPS boards that start to use CONFIG_NEW_TIME_C, two
jsun> rtc operations are implemented, rtc_get_time() and
jsun> rtc_set_time().
jsun> It is possible to write a simple generic RTC driver that is
jsun> based on these two ops and can do simple RTC read&write ops.
...
jsun> This is the idea behind the generic MIPS rtc driver.  See the
jsun> patch below.
...
jsun> Any comments?

Good idea.  I hope cvs kernel import this patch.


I found two small things to fix.  to_tm function sets 1..12 value in
tm_mon field, so

1. in rtc_ioctl (case RTC_RD_TIME), subtracting 1 from rtc_tm.tm_mon
   is needed.

2. in rtc_proc_output, adding 1 to tm.tm_mon is not needed.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>