The patch titled Subject: rtc/spear: fix for RTC_AIE_ON and RTC_AIE_OFF ioctl errors has been added to the -mm tree. Its filename is rtc-spear-fix-for-rtc_aie_on-and-rtc_aie_off-ioctl-errors.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Shiraz Hashim <shiraz.hashim@xxxxxx> Subject: rtc/spear: fix for RTC_AIE_ON and RTC_AIE_OFF ioctl errors Define API for '.alarm_irq_enable' to enable and disable alarm irq. This is required by the framework else RTC_AIE_ON and RTC_AIE_OFF ioctls return errors. Signed-off-by: Shiraz Hashim <shiraz.hashim@xxxxxx> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxx> Cc: Deepak Sikri <deepak.sikri@xxxxxx> Acked-by: Rajeev Kumar <rajeev-dlh.kumar@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-spear.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff -puN drivers/rtc/rtc-spear.c~rtc-spear-fix-for-rtc_aie_on-and-rtc_aie_off-ioctl-errors drivers/rtc/rtc-spear.c --- a/drivers/rtc/rtc-spear.c~rtc-spear-fix-for-rtc_aie_on-and-rtc_aie_off-ioctl-errors +++ a/drivers/rtc/rtc-spear.c @@ -327,11 +327,39 @@ static int spear_rtc_set_alarm(struct de return 0; } + +static int spear_alarm_irq_enable(struct device *dev, unsigned int enabled) +{ + struct platform_device *pdev = to_platform_device(dev); + struct rtc_device *rtc = platform_get_drvdata(pdev); + struct spear_rtc_config *config = dev_get_drvdata(&rtc->dev); + int ret = 0; + + spear_rtc_clear_interrupt(config); + + switch (enabled) { + case 0: + /* alarm off */ + spear_rtc_disable_interrupt(config); + break; + case 1: + /* alarm on */ + spear_rtc_enable_interrupt(config); + break; + default: + ret = -EINVAL; + break; + } + + return ret; +} + static struct rtc_class_ops spear_rtc_ops = { .read_time = spear_rtc_read_time, .set_time = spear_rtc_set_time, .read_alarm = spear_rtc_read_alarm, .set_alarm = spear_rtc_set_alarm, + .alarm_irq_enable = spear_alarm_irq_enable, }; static int __devinit spear_rtc_probe(struct platform_device *pdev) _ Subject: Subject: rtc/spear: fix for RTC_AIE_ON and RTC_AIE_OFF ioctl errors Patches currently in -mm which might be from shiraz.hashim@xxxxxx are rtc-spear-fix-for-balancing-the-enable_irq_wake-in-power-mgmt.patch rtc-spear-fix-for-rtc_aie_on-and-rtc_aie_off-ioctl-errors.patch rtc-rtc-spear-call-platform_set_drvdata-before-registering-rtc-device.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html