linux-mips
[Top] [All Lists]

rtc_[gs]et_time()

To: Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: rtc_[gs]et_time()
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 15 Apr 2003 11:02:35 +0200 (MEST)
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
        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 makes it more complex to make drivers/char/genrtc.c work on MIPS, since 
usually the date and time have to be converted twice: once from struct rtc_time
to seconds in <asm/rtc.h>, and once from seconds to struct rtc_time in each RTC
driver.

Is it OK to make rtc_[gs]et_time() always use struct rtc_time?

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


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