Subject: Re: todr changes to improve clock accuracy across sleeps & reboots
To: Garrett D'Amore <firstname.lastname@example.org>
From: Perry E. Metzger <email@example.com>
Date: 09/08/2006 16:29:03
Garrett D'Amore <firstname.lastname@example.org> writes:
>> So, getting quite practical for a moment, the question is, do we want
>> to do the inittodr spin in todr_gettime or in the MD code? I favor
>> doing it in MI code if at all possible, in which case todr_gettime is
>> probably the place.
> Actually, my opinion is that todr_gettime() should do this only for the
> drivers that use todr_gettime_ymdhms.
That seems reasonable.
>> On the todr_settime side, it should be pretty easy to set the sleep
>> until the next tick happens right in todr_settime.
> Yes, but again, you don't want to do that if the rtc actually has
> subsecond precision. Several do.
Ah. I thought that there weren't any like that out there. Assuming
that we have a few such, perhaps a device property should tell us
whether we have only 1 second precision or not, and the test in
todr_gettime and todr_settime could be based on that...