diff options
Diffstat (limited to 'drivers/rtc/rtc-bfin.c')
-rw-r--r-- | drivers/rtc/rtc-bfin.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index b4b6087f2234..17971d93354d 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
@@ -259,15 +259,6 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar | |||
259 | bfin_rtc_int_clear(~RTC_ISTAT_SEC); | 259 | bfin_rtc_int_clear(~RTC_ISTAT_SEC); |
260 | break; | 260 | break; |
261 | 261 | ||
262 | case RTC_AIE_ON: | ||
263 | dev_dbg_stamp(dev); | ||
264 | bfin_rtc_int_set_alarm(rtc); | ||
265 | break; | ||
266 | case RTC_AIE_OFF: | ||
267 | dev_dbg_stamp(dev); | ||
268 | bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); | ||
269 | break; | ||
270 | |||
271 | default: | 262 | default: |
272 | dev_dbg_stamp(dev); | 263 | dev_dbg_stamp(dev); |
273 | ret = -ENOIOCTLCMD; | 264 | ret = -ENOIOCTLCMD; |
@@ -276,6 +267,17 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar | |||
276 | return ret; | 267 | return ret; |
277 | } | 268 | } |
278 | 269 | ||
270 | static int bfin_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | ||
271 | { | ||
272 | struct bfin_rtc *rtc = dev_get_drvdata(dev); | ||
273 | |||
274 | dev_dbg_stamp(dev); | ||
275 | if (enabled) | ||
276 | bfin_rtc_int_set_alarm(rtc); | ||
277 | else | ||
278 | bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); | ||
279 | } | ||
280 | |||
279 | static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm) | 281 | static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm) |
280 | { | 282 | { |
281 | struct bfin_rtc *rtc = dev_get_drvdata(dev); | 283 | struct bfin_rtc *rtc = dev_get_drvdata(dev); |
@@ -362,6 +364,7 @@ static struct rtc_class_ops bfin_rtc_ops = { | |||
362 | .read_alarm = bfin_rtc_read_alarm, | 364 | .read_alarm = bfin_rtc_read_alarm, |
363 | .set_alarm = bfin_rtc_set_alarm, | 365 | .set_alarm = bfin_rtc_set_alarm, |
364 | .proc = bfin_rtc_proc, | 366 | .proc = bfin_rtc_proc, |
367 | .alarm_irq_enable = bfin_rtc_alarm_irq_enable, | ||
365 | }; | 368 | }; |
366 | 369 | ||
367 | static int __devinit bfin_rtc_probe(struct platform_device *pdev) | 370 | static int __devinit bfin_rtc_probe(struct platform_device *pdev) |