Skip to content

Commit dbb49a2

Browse files
johnstultz-workgregkh
authored andcommitted
rtc: m41t80: Workaround broken alarm functionality
commit c3b7977 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>
1 parent d853ba9 commit dbb49a2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎drivers/rtc/rtc-m41t80.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,19 @@ static int m41t80_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *t)
357357
static struct rtc_class_ops m41t80_rtc_ops = {
358358
.read_time = m41t80_rtc_read_time,
359359
.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+
*
360364
.read_alarm = m41t80_rtc_read_alarm,
361365
.set_alarm = m41t80_rtc_set_alarm,
366+
*/
362367
.proc = m41t80_rtc_proc,
368+
/*
369+
* See above comment on broken alarm
370+
*
363371
.alarm_irq_enable = m41t80_rtc_alarm_irq_enable,
372+
*/
364373
};
365374

366375
#if defined(CONFIG_RTC_INTF_SYSFS) || defined(CONFIG_RTC_INTF_SYSFS_MODULE)

0 commit comments

Comments
 (0)