On Tue, 15 Apr 2003, Ladislav Michl wrote: > > >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? > > > > > I quite like it the way it is ;-) > > While I would like to see rtc_[gs]et_time() always use struct rtc_time ;) Note that the system time is always a monotonic count of seconds (plus a fractional part), but the format stored in RTC chips varies. So I think it should be passed unchanged and the convertion left up to specific drivers, possibly with an aid for ones that closely match 'struct rtc_time' by means of library or inline helper functions. E.g. one of the yet unsupported DECstations uses a 32bit register counting 10ms intervals as its RTC (or actually TOY). So maybe it's 'struct timespec' that should really be passed... -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +