On Fri, Dec 14, 2012 at 01:22:50PM -0800, John Stultz wrote:Something like this could work, although I worry it only causes even more code paths:
Although from a timekeeping perspective, the read_persistent_clock()Sure, but my view on this is that it has nothing to do with
interface is actually *much* preferred over the rtc HCTOSYS device.
Since read_persistent_clock() has the requirement that its safe to
call with IRQs disabled, we can use it in the timekeeping
suspend/resume code, which allows for better time accuracy.
read_persistent_clock. If the RTC driver can run with IRQs off is a
property of the RTC driver and RTC hardware - it has nothing to do
with the platform. ARM platforms will vary on a machine by machine
basis. The rtc-mv driver used on my ARM system is perfectly
re-entrant, lots of rtc on SOC drivers will be the same.
If this is the only thing keeping you on read_persistent_clock, for
real RTCs, then how about a RTC_DEV_SAFE_READ flag (or whatever) in
rtc_device.flags?
Reserve read_persistent_clock for things like that very specialized
non-RTC ARM counter.
True, and maybe something I just have to live with. But I can still make holiday wish lists :)While we're suggesting cleanups, the RTC Kconfig choices probablyThat is a general pain with the new 'everything is a driver'..
need a cleanup too, as the list of all possible drivers can be
confusing, when usually each architecture has only a few that they