acrn-kernel/drivers/rtc
Jamie Lenehan 1b73e6ae45 rtc: rtc-sh: alarm support.
This adds alarm support for the RTC_ALM_SET, RTC_ALM_READ,
RTC_WKALM_SET and RTC_WKALM_RD operations to rtc-sh.

The only unusual part is the handling of the alarm interrupt. If you
clear the alarm flag (AF) while the time in the RTC still matches the
time in the alarm registers than AF is immediately re-set, and if the
alarm interrupt (AIE) is still enabled then it re-triggers. I was
originally getting around 20k+ interrupts generated during the second
when the RTC and alarm registers matches.

The solution I've used is to clear AIE when the alarm goes off and
then use the carry interrupt to re-enabled it. The carry interrupt
will check AF and re-enabled AIE if it's clear. If AF is not clear
it'll clear it and then the check will be repeated next carry
interrupt. This a bit in rtc structure that indicates that it's
waiting to have AIE re-enabled so it doesn't turn it on when it
wasn't enabled anyway.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
..
Kconfig [PATCH] AT91RM9200 RTC 2006-12-10 09:55:40 -08:00
Makefile [PATCH] AT91RM9200 RTC 2006-12-10 09:55:40 -08:00
class.c
hctosys.c
interface.c
rtc-at91rm9200.c [PATCH] AT91RM9200 RTC 2006-12-10 09:55:40 -08:00
rtc-dev.c
rtc-ds1307.c
rtc-ds1553.c
rtc-ds1672.c [PATCH] RTCs don't use i2c_adapter.dev 2006-12-10 09:55:40 -08:00
rtc-ds1742.c
rtc-ep93xx.c
rtc-isl1208.c
rtc-lib.c
rtc-m48t86.c
rtc-max6902.c
rtc-omap.c
rtc-pcf8563.c [PATCH] RTCs don't use i2c_adapter.dev 2006-12-10 09:55:40 -08:00
rtc-pcf8583.c
rtc-pl031.c
rtc-proc.c
rtc-rs5c348.c
rtc-rs5c372.c [PATCH] RTCs don't use i2c_adapter.dev 2006-12-10 09:55:40 -08:00
rtc-s3c.c
rtc-sa1100.c
rtc-sh.c rtc: rtc-sh: alarm support. 2006-12-12 08:42:08 +09:00
rtc-sysfs.c
rtc-test.c
rtc-v3020.c
rtc-vr41xx.c
rtc-x1205.c [PATCH] RTCs don't use i2c_adapter.dev 2006-12-10 09:55:40 -08:00