Lines Matching refs:clkevt
117 static int stm32_clock_event_shutdown(struct clock_event_device *clkevt) in stm32_clock_event_shutdown() argument
119 struct timer_of *to = to_timer_of(clkevt); in stm32_clock_event_shutdown()
127 struct clock_event_device *clkevt) in stm32_clock_event_set_next_event() argument
129 struct timer_of *to = to_timer_of(clkevt); in stm32_clock_event_set_next_event()
144 static int stm32_clock_event_set_periodic(struct clock_event_device *clkevt) in stm32_clock_event_set_periodic() argument
146 struct timer_of *to = to_timer_of(clkevt); in stm32_clock_event_set_periodic()
150 return stm32_clock_event_set_next_event(timer_of_period(to), clkevt); in stm32_clock_event_set_periodic()
153 static int stm32_clock_event_set_oneshot(struct clock_event_device *clkevt) in stm32_clock_event_set_oneshot() argument
155 struct timer_of *to = to_timer_of(clkevt); in stm32_clock_event_set_oneshot()
164 struct clock_event_device *clkevt = (struct clock_event_device *)dev_id; in stm32_clock_event_handler() local
165 struct timer_of *to = to_timer_of(clkevt); in stm32_clock_event_handler()
169 if (clockevent_state_periodic(clkevt)) in stm32_clock_event_handler()
170 stm32_clock_event_set_periodic(clkevt); in stm32_clock_event_handler()
172 stm32_clock_event_shutdown(clkevt); in stm32_clock_event_handler()
174 clkevt->event_handler(clkevt); in stm32_clock_event_handler()
272 to->clkevt.name = to->np->full_name; in stm32_clockevent_init()
273 to->clkevt.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; in stm32_clockevent_init()
274 to->clkevt.set_state_shutdown = stm32_clock_event_shutdown; in stm32_clockevent_init()
275 to->clkevt.set_state_periodic = stm32_clock_event_set_periodic; in stm32_clockevent_init()
276 to->clkevt.set_state_oneshot = stm32_clock_event_set_oneshot; in stm32_clockevent_init()
277 to->clkevt.tick_resume = stm32_clock_event_shutdown; in stm32_clockevent_init()
278 to->clkevt.set_next_event = stm32_clock_event_set_next_event; in stm32_clockevent_init()
279 to->clkevt.rating = bits == 32 ? 250 : 100; in stm32_clockevent_init()
281 clockevents_config_and_register(&to->clkevt, timer_of_rate(to), 0x1, in stm32_clockevent_init()