You should be using the standard RTC library calls, exported
from drivers/rtc/interface.c ... and making sure this mechanism
will work with any wakeup-capable RTC. Otherwise you'll end
being needlessly x86-specific, or reinventing those calls.
Plus, the way you're doing it now is violating the locking
protocol used by that driver.
- Dave
--