[Top] [All Lists]

Re: rtc_[gs]et_time()

To: Geert Uytterhoeven <>
Subject: Re: rtc_[gs]et_time()
From: Jun Sun <>
Date: Tue, 15 Apr 2003 11:33:56 -0700
Cc: Linux/MIPS Development <>,
In-reply-to: <>; from on Tue, Apr 15, 2003 at 11:02:35AM +0200
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.2.5i
On Tue, Apr 15, 2003 at 11:02:35AM +0200, Geert Uytterhoeven wrote:
>       Hi,
> Is there any specific reason why the function pointers rtc_[gs]et_time() use
> seconds instead of struct rtc_time? Most RTCs store the date and time in a
> format similar to struct rtc_time, so they have to convert from seconds to
> struct rtc_time again. I found only 2 exceptions, namely the vr4181 RTC and 
> the
> Lasat ds1630 RTC (BTW, I found no RTC driver for vr41xx, since
> vr41xx_rtc_get_time() is nowhere defined).

This interface is designed to 1) satisfy rtc need by system timer (see
arch/mips/kernel/time.c) and 2) provide abstract for vastly different 
RTC hardwares.  Using "second" is a nature choice to interface with xtime

There are quite a few different RTCs.  And I am sure there are others coming.
vr4181_rtc_get_time() is another example (which you missed :0)

Extending this interface to support user rtc driver (/dev/rtc) is desirable.
Since rtc driver is not called frequently, converting twice is not much a 

BTW, I think the wrapping function done in PPC for genrtc should just work
for MIPS. :)

Once genrtc is done for MIPS, we should remove mips_rtc driver.


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