linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.20-rc3] rtc-sa1100 correctly reports rtc_wkalrm.enabled
@ 2007-01-06  4:55 David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2007-01-06  4:55 UTC (permalink / raw)
  To: Alessandro Zummo, rpurdie; +Cc: rtc-linux, Linux Kernel list

This fixes one bug in the SA-1100/PXA RTC support:  read_alarm()
isn't reporting whether the alarm is enabled.  This causes a small
regression, with procfs no longer reporting that state.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

---
Note there are still bugs with how this driver handles this "enabled"
flag when it _sets_ alarms.  I'm told the hh.org tree already merged
this particular patch.

Index: at91/drivers/rtc/rtc-sa1100.c
===================================================================
--- at91.orig/drivers/rtc/rtc-sa1100.c	2006-12-18 23:32:22.000000000 -0800
+++ at91/drivers/rtc/rtc-sa1100.c	2006-12-19 00:09:46.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->enabled = (rtsr & RTSR_ALE) ? 1 : 0;
+	alrm->pending = (rtsr & RTSR_AL) ? 1 : 0;
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-06  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-06  4:55 [patch 2.6.20-rc3] rtc-sa1100 correctly reports rtc_wkalrm.enabled David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).