From: David Brownell <david-b@pacbell.net>
To: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>, rpurdie@rpsys.net
Subject: [patch 2.6.19-rc6 2/6] rtc-sa1100 tweaks
Date: Mon, 20 Nov 2006 10:19:53 -0800 [thread overview]
Message-ID: <200611201019.53906.david-b@pacbell.net> (raw)
In-Reply-To: <200611201014.41980.david-b@pacbell.net>
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@users.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",
next prev parent reply other threads:[~2006-11-20 22:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 18:14 [patch 2.6.19-rc6 0/6] more rtc framework/driver updates David Brownell
2006-11-20 18:17 ` [patch 2.6.19-rc6 1/6] rtc class /proc/driver/rtc update David Brownell
2006-11-20 23:13 ` Alessandro Zummo
2006-11-21 2:47 ` [Bulk] " David Brownell
2006-11-22 20:37 ` Alessandro Zummo
2006-11-23 0:39 ` David Brownell
2006-11-20 18:19 ` David Brownell [this message]
2006-11-20 22:48 ` [patch 2.6.19-rc6 2/6] rtc-sa1100 tweaks Russell King
2006-11-21 1:46 ` David Brownell
2006-11-20 18:22 ` [patch 2.6.19-rc6 3/6] X86_PC optionally creates rtc_cmos platform device David Brownell
2006-11-20 18:27 ` [patch 2.6.19-rc6 5/6] rtc-cmos driver David Brownell
2006-11-20 18:27 ` [patch 2.6.19-rc6 4/6] ACPI exports RTC extensions through platform_data David Brownell
2006-11-20 18:28 ` [patch 2.6.19-rc6 6/6] rtc-omap driver David Brownell
2006-11-20 23:09 ` Alessandro Zummo
2006-11-22 1:19 ` Andrew Morton
2006-11-22 2:15 ` David Brownell
2006-11-22 2:28 ` Andrew Morton
2006-11-23 0:09 ` David Brownell
2006-11-22 20:34 ` Alessandro Zummo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611201019.53906.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=alessandro.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.