On Tue, Apr 15, 2003 at 11:02:35AM +0200, Geert Uytterhoeven wrote:
> 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
> 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.