Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297384
b: refs/heads/master
c: 4a64990
h: refs/heads/master
v: v3
  • Loading branch information
John Stultz committed Mar 16, 2012
1 parent 371d05d commit 3d22cf3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74a622be3db2898251cb524d1edbeaea589f2723
refs/heads/master: 4a649903f91232d02284d53724b0a45728111767
5 changes: 5 additions & 0 deletions trunk/drivers/rtc/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,11 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled)
if (rtc->uie_rtctimer.enabled == enabled)
goto out;

if (rtc->uie_unsupported) {
err = -EINVAL;
goto out;
}

if (enabled) {
struct rtc_time tm;
ktime_t now, onesec;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/rtc/rtc-mpc5121.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ static int __devinit mpc5121_rtc_probe(struct platform_device *op)
&mpc5200_rtc_ops, THIS_MODULE);
}

rtc->rtc->uie_unsupported = 1;

if (IS_ERR(rtc->rtc)) {
err = PTR_ERR(rtc->rtc);
goto out_free_irq;
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ struct rtc_device
struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */
int pie_enabled;
struct work_struct irqwork;

/* Some hardware can't support UIE mode */
int uie_unsupported;

#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
struct work_struct uie_task;
Expand Down

0 comments on commit 3d22cf3

Please sign in to comment.