56 static int ds1287_set_next_event(
unsigned long delta,
57 struct clock_event_device *
evt)
62 static void ds1287_set_mode(
enum clock_event_mode
mode,
63 struct clock_event_device *
evt)
72 case CLOCK_EVT_MODE_PERIODIC:
82 spin_unlock(&rtc_lock);
85 static void ds1287_event_handler(
struct clock_event_device *
dev)
89 static struct clock_event_device ds1287_clockevent = {
91 .features = CLOCK_EVT_FEAT_PERIODIC,
92 .set_next_event = ds1287_set_next_event,
93 .set_mode = ds1287_set_mode,
94 .event_handler = ds1287_event_handler,
99 struct clock_event_device *
cd = &ds1287_clockevent;
104 cd->event_handler(cd);
109 static struct irqaction ds1287_irqaction = {
110 .handler = ds1287_interrupt,
117 struct clock_event_device *
cd;
119 cd = &ds1287_clockevent;
122 clockevent_set_clock(cd, 32768);
129 return setup_irq(irq, &ds1287_irqaction);