diff options
author | David Brownell <david-b@pacbell.net> | 2006-12-13 00:35:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 09:05:52 -0800 |
commit | a2db8dfce8d94fecae50128d912fec7980687a51 (patch) | |
tree | 0670b0d16e3282967dabb073cad6a7e3342812f5 /drivers/rtc/rtc-s3c.c | |
parent | 5a6534e4cf53e16a6ea92f033f89d6575b3d7422 (diff) |
[PATCH] rtc framewok: rtc_wkalrm.enabled reporting updates
Fix a glitch in the procfs dumping of whether the alarm IRQ is enabled: use
the traditional name (from drivers/char/rtc.c and many other places) of
"alarm_IRQ", not "alrm_wakeup" (which didn't even match the efirtc code, which
originated that reporting API).
Also, update a few of the RTC drivers to stop providing that duplicate status,
and/or to expose it properly when reporting the alarm state. We really don't
want every RTC driver doing their own thing here...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index e301dea57bb..f406a2b55ae 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -191,6 +191,8 @@ static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) alm_en = readb(base + S3C2410_RTCALM); + alrm->enabled = (alm_en & S3C2410_RTCALM_ALMEN) ? 1 : 0; + pr_debug("read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n", alm_en, alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, @@ -331,12 +333,8 @@ static int s3c_rtc_ioctl(struct device *dev, static int s3c_rtc_proc(struct device *dev, struct seq_file *seq) { - unsigned int rtcalm = readb(s3c_rtc_base + S3C2410_RTCALM); unsigned int ticnt = readb(s3c_rtc_base + S3C2410_TICNT); - seq_printf(seq, "alarm_IRQ\t: %s\n", - (rtcalm & S3C2410_RTCALM_ALMEN) ? "yes" : "no" ); - seq_printf(seq, "periodic_IRQ\t: %s\n", (ticnt & S3C2410_TICNT_ENABLE) ? "yes" : "no" ); |