summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-12-12 13:57:52 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-11 08:56:55 -0800
commit3369673e3d1186ddc90fe31e936e4037052e01fe (patch)
tree56253c697733eeb3a239af0500841821f57620f1
parent676d665055baaa982f38ba8024cef5a7bdc1d435 (diff)
rtc: m41t80: Workaround broken alarm functionality
commit c3b79770e51ab1fd4201f3b54edf30113b9ce74f upstream. 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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Idbb49a2b153a9da2a281e927f14e4a15a676987d Reviewed-on: http://git-master/r/74157 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
-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)
static struct rtc_class_ops m41t80_rtc_ops = {
.read_time = m41t80_rtc_read_time,
.set_time = m41t80_rtc_set_time,
+ /*
+ * XXX - m41t80 alarm functionality is reported broken.
+ * until it is fixed, don't register alarm functions.
+ *
.read_alarm = m41t80_rtc_read_alarm,
.set_alarm = m41t80_rtc_set_alarm,
+ */
.proc = m41t80_rtc_proc,
+ /*
+ * See above comment on broken alarm
+ *
.alarm_irq_enable = m41t80_rtc_alarm_irq_enable,
+ */
};
#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE)