[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200611201019.53906.david-b@pacbell.net>
Date: Mon, 20 Nov 2006 10:19:53 -0800
From: David Brownell <david-b@...bell.net>
To: Alessandro Zummo <alessandro.zummo@...ertech.it>
Cc: Linux Kernel list <linux-kernel@...r.kernel.org>, rpurdie@...ys.net
Subject: [patch 2.6.19-rc6 2/6] rtc-sa1100 tweaks
Minor updates to rtc-sa1100: report whether the alarm is enabled, remove
duplicate procfs reporting of that factoid, and stick a FIXME at a place
where alarms should be enabled (but aren't).
Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
Index: g26/drivers/rtc/rtc-sa1100.c
===================================================================
--- g26.orig/drivers/rtc/rtc-sa1100.c 2006-11-20 09:35:19.000000000 -0800
+++ g26/drivers/rtc/rtc-sa1100.c 2006-11-20 09:36:24.000000000 -0800
@@ -263,8 +263,12 @@ static int sa1100_rtc_set_time(struct de
static int sa1100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{
+ u32 rtsr;
+
memcpy(&alrm->time, &rtc_alarm, sizeof(struct rtc_time));
- alrm->pending = RTSR & RTSR_AL ? 1 : 0;
+ rtsr = RTSR;
+ alrm->pending = (rtsr & RTSR_AL) ? 1 : 0;
+ alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0;
return 0;
}
@@ -277,6 +281,7 @@ static int sa1100_rtc_set_alarm(struct d
if (ret == 0) {
memcpy(&rtc_alarm, &alrm->time, sizeof(struct rtc_time));
+ /* FIXME 'enabled' should update RTSR_ALE instead */
if (alrm->enabled)
enable_irq_wake(IRQ_RTCAlrm);
else
@@ -290,8 +295,6 @@ static int sa1100_rtc_set_alarm(struct d
static int sa1100_rtc_proc(struct device *dev, struct seq_file *seq)
{
seq_printf(seq, "trim/divider\t: 0x%08lx\n", RTTR);
- seq_printf(seq, "alarm_IRQ\t: %s\n",
- (RTSR & RTSR_ALE) ? "yes" : "no" );
seq_printf(seq, "update_IRQ\t: %s\n",
(RTSR & RTSR_HZE) ? "yes" : "no");
seq_printf(seq, "periodic_IRQ\t: %s\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists