aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-02-06 04:38:45 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:13 -0500
commit8a0bdfd7a05f5bb0486fbe7146a2cf775957e95e (patch)
tree2de49bb837ef636cd07c10ef7773194731f412da /drivers/rtc/rtc-dev.c
parent739d340dba45ab786a5553144bbffbee0afe15dd (diff)
rtc-cmos alarm acts as oneshot
Start making the rtc-cmos alarm act more like a oneshot alarm by disabling that alarm after its IRQ fires. (ACPI hooks are also needed.) The Linux RTC framework has previously been a bit vague in this area, but any other behavior is problematic and not very portable. RTCs with full YYYY-MM-DD HH:MM[:SS] alarms won't have a problem here. Only ones with partial match criteria, with the most visible example being the PC RTC, get confused. (Because the criteria will match repeatedly.) Update comments relating to that oneshot behavior and timezone handling. (Timezones are another issue that's mostly visible with rtc-cmos. That's because PCs often dual-boot MS-Windows, which likes its RTC to match local wall-clock time instead of UTC.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 025c60a17a4a..90dfa0df747a 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -246,6 +246,15 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
246 /* if the driver does not provide the ioctl interface 246 /* if the driver does not provide the ioctl interface
247 * or if that particular ioctl was not implemented 247 * or if that particular ioctl was not implemented
248 * (-ENOIOCTLCMD), we will try to emulate here. 248 * (-ENOIOCTLCMD), we will try to emulate here.
249 *
250 * Drivers *SHOULD NOT* provide ioctl implementations
251 * for these requests. Instead, provide methods to
252 * support the following code, so that the RTC's main
253 * features are accessible without using ioctls.
254 *
255 * RTC and alarm times will be in UTC, by preference,
256 * but dual-booting with MS-Windows implies RTCs must
257 * use the local wall clock time.
249 */ 258 */
250 259
251 switch (cmd) { 260 switch (cmd) {