aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m41t80.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-12-12 16:57:52 -0500
committerJohn Stultz <john.stultz@linaro.org>2011-12-13 15:26:24 -0500
commitc3b79770e51ab1fd4201f3b54edf30113b9ce74f (patch)
treea37fa11f7341f765e66fa9091ea6a75e66431308 /drivers/rtc/rtc-m41t80.c
parent93b2ec0128c431148b216b8f7337c1a52131ef03 (diff)
rtc: m41t80: Workaround broken alarm functionality
The m41t80 driver can read and set the alarm, but it doesn't seem to have a functional alarm irq. This causes failures when the generic core sees alarm functions, but then cannot use them properly for things like UIE mode. Disabling the alarm functions allows proper error reporting, and possible fallback to emulated modes. Once someone fixes the alarm irq functionality, this can be restored. CC: stable@kernel.org CC: Matt Turner <mattst88@gmail.com> CC: Nico Macrionitis <acrux@cruxppc.org> CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Reported-by: Matt Turner <mattst88@gmail.com> Reported-by: Nico Macrionitis <acrux@cruxppc.org> Tested-by: Nico Macrionitis <acrux@cruxppc.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
-rw-r--r--drivers/rtc/rtc-m41t80.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index eda128fc1d38..64aedd8cc095 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -357,10 +357,19 @@ static int m41t80_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *t)
357static struct rtc_class_ops m41t80_rtc_ops = { 357static struct rtc_class_ops m41t80_rtc_ops = {
358 .read_time = m41t80_rtc_read_time, 358 .read_time = m41t80_rtc_read_time,
359 .set_time = m41t80_rtc_set_time, 359 .set_time = m41t80_rtc_set_time,
360 /*
361 * XXX - m41t80 alarm functionality is reported broken.
362 * until it is fixed, don't register alarm functions.
363 *
360 .read_alarm = m41t80_rtc_read_alarm, 364 .read_alarm = m41t80_rtc_read_alarm,
361 .set_alarm = m41t80_rtc_set_alarm, 365 .set_alarm = m41t80_rtc_set_alarm,
366 */
362 .proc = m41t80_rtc_proc, 367 .proc = m41t80_rtc_proc,
368 /*
369 * See above comment on broken alarm
370 *
363 .alarm_irq_enable = m41t80_rtc_alarm_irq_enable, 371 .alarm_irq_enable = m41t80_rtc_alarm_irq_enable,
372 */
364}; 373};
365 374
366#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE) 375#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE)