lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] don't reset alarm interrupt on RTC

On Wed, 31 Oct 2001, Tim Hockin wrote:

> All,
>
> Attached is a 1-liner to not clear the Alarm-Int-Enable bit automatically
> on the RTC device. This makes wake-on-alarm possible.
>
> Please let me know if there is a problem with it. This is against 2.4.13
> for inclusion in 2.4.14.
>
> Tim
>

diff -ruN dist-2.4.13+patches/drivers/char/rtc.c
linux-2.4/drivers/char/rtc.c
--- dist-2.4.13+patches/drivers/char/rtc.c Mon Oct 1 16:43:52 2001
+++ linux-2.4/drivers/char/rtc.c Mon Oct 29 11:07:42 2001
@@ -560,7 +560,7 @@
spin_lock_irq(&rtc_lock);
tmp = CMOS_READ(RTC_CONTROL);
tmp &= ~RTC_PIE;
- tmp &= ~RTC_AIE;
+ //tmp &= ~RTC_AIE;
tmp &= ~RTC_UIE;
CMOS_WRITE(tmp, RTC_CONTROL);
CMOS_READ(RTC_INTR_FLAGS);
Why would you want to unconditionally enable this interrupt?

And how do you set the alarm time?

I implmemented Wake-on-alarm for the ACPI suspend case. The way I did it
was to implement a procfs handler that set the alarm time and enabled the
interrupt. I fantasized about porting it to the RTC procfs handler, but I
never got around to it. The ACPI list archives should have more info/clues
about it..

But, I don't think this should be enabled by default.

-pat

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.038 / U:25.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site