Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107670
b: refs/heads/master
c: e12af37
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Aug 5, 2008
1 parent 89dbf22 commit eee8a77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 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: 140fab14aef093cedf87f69234474c04fdcec99c
refs/heads/master: e12af37d9ee09c2ac6da26a51c77754dec09fed4
28 changes: 18 additions & 10 deletions trunk/drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,6 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar
bfin_rtc_sync_pending(dev);

switch (cmd) {
case RTC_PIE_ON:
dev_dbg_stamp(dev);
bfin_rtc_int_set(RTC_ISTAT_STOPWATCH);
bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq);
break;
case RTC_PIE_OFF:
dev_dbg_stamp(dev);
bfin_rtc_int_clear(~RTC_ISTAT_STOPWATCH);
break;

case RTC_UIE_ON:
dev_dbg_stamp(dev);
bfin_rtc_int_set(RTC_ISTAT_SEC);
Expand Down Expand Up @@ -381,6 +371,23 @@ static int bfin_rtc_proc(struct device *dev, struct seq_file *seq)
#undef yesno
}

static int bfin_irq_set_state(struct device *dev, int enabled)
{
struct bfin_rtc *rtc = dev_get_drvdata(dev);

dev_dbg_stamp(dev);

bfin_rtc_sync_pending(dev);

if (enabled) {
bfin_rtc_int_set(RTC_ISTAT_STOPWATCH);
bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq);
} else
bfin_rtc_int_clear(~RTC_ISTAT_STOPWATCH);

return 0;
}

static struct rtc_class_ops bfin_rtc_ops = {
.open = bfin_rtc_open,
.release = bfin_rtc_release,
Expand All @@ -390,6 +397,7 @@ static struct rtc_class_ops bfin_rtc_ops = {
.read_alarm = bfin_rtc_read_alarm,
.set_alarm = bfin_rtc_set_alarm,
.proc = bfin_rtc_proc,
.irq_set_state = bfin_irq_set_state,
};

static int __devinit bfin_rtc_probe(struct platform_device *pdev)
Expand Down

0 comments on commit eee8a77

Please sign in to comment.