• Home
  • Raw
  • Download

Lines Matching refs:dev

163 void tick_install_broadcast_device(struct clock_event_device *dev, int cpu)  in tick_install_broadcast_device()  argument
167 if (tick_set_oneshot_wakeup_device(dev, cpu)) in tick_install_broadcast_device()
170 if (!tick_check_broadcast_device(cur, dev)) in tick_install_broadcast_device()
173 if (!try_module_get(dev->owner)) in tick_install_broadcast_device()
176 clockevents_exchange_device(cur, dev); in tick_install_broadcast_device()
179 tick_broadcast_device.evtdev = dev; in tick_install_broadcast_device()
181 tick_broadcast_start_periodic(dev); in tick_install_broadcast_device()
183 if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT)) in tick_install_broadcast_device()
209 int tick_is_broadcast_device(struct clock_event_device *dev) in tick_is_broadcast_device() argument
211 return (dev && tick_broadcast_device.evtdev == dev); in tick_is_broadcast_device()
214 int tick_broadcast_update_freq(struct clock_event_device *dev, u32 freq) in tick_broadcast_update_freq() argument
218 if (tick_is_broadcast_device(dev)) { in tick_broadcast_update_freq()
220 ret = __clockevents_update_freq(dev, freq); in tick_broadcast_update_freq()
232 static void tick_device_setup_broadcast_func(struct clock_event_device *dev) in tick_device_setup_broadcast_func() argument
234 if (!dev->broadcast) in tick_device_setup_broadcast_func()
235 dev->broadcast = tick_broadcast; in tick_device_setup_broadcast_func()
236 if (!dev->broadcast) { in tick_device_setup_broadcast_func()
238 dev->name); in tick_device_setup_broadcast_func()
239 dev->broadcast = err_broadcast; in tick_device_setup_broadcast_func()
247 int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) in tick_device_uses_broadcast() argument
261 if (!tick_device_is_functional(dev)) { in tick_device_uses_broadcast()
262 dev->event_handler = tick_handle_periodic; in tick_device_uses_broadcast()
263 tick_device_setup_broadcast_func(dev); in tick_device_uses_broadcast()
275 if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_device_uses_broadcast()
278 tick_device_setup_broadcast_func(dev); in tick_device_uses_broadcast()
400 static void tick_handle_periodic_broadcast(struct clock_event_device *dev) in tick_handle_periodic_broadcast() argument
415 if (clockevent_state_oneshot(dev)) { in tick_handle_periodic_broadcast()
416 ktime_t next = ktime_add_ns(dev->next_event, TICK_NSEC); in tick_handle_periodic_broadcast()
418 clockevents_program_event(dev, next, true); in tick_handle_periodic_broadcast()
440 struct clock_event_device *bc, *dev; in tick_broadcast_control() local
448 dev = td->evtdev; in tick_broadcast_control()
453 if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_broadcast_control()
456 if (!tick_device_is_functional(dev)) in tick_broadcast_control()
480 clockevents_shutdown(dev); in tick_broadcast_control()
491 tick_setup_periodic(dev, 0); in tick_broadcast_control()
515 void tick_set_periodic_handler(struct clock_event_device *dev, int broadcast) in tick_set_periodic_handler() argument
518 dev->event_handler = tick_handle_periodic; in tick_set_periodic_handler()
520 dev->event_handler = tick_handle_periodic_broadcast; in tick_set_periodic_handler()
686 static void tick_handle_oneshot_broadcast(struct clock_event_device *dev) in tick_handle_oneshot_broadcast() argument
694 dev->next_event = KTIME_MAX; in tick_handle_oneshot_broadcast()
756 tick_broadcast_set_event(dev, next_cpu, next_event); in tick_handle_oneshot_broadcast()
776 struct clock_event_device *dev) in broadcast_shutdown_local() argument
786 if (dev->next_event < bc->next_event) in broadcast_shutdown_local()
789 clockevents_switch_state(dev, CLOCK_EVT_STATE_SHUTDOWN); in broadcast_shutdown_local()
796 struct clock_event_device *bc, *dev = td->evtdev; in ___tick_broadcast_oneshot_control() local
830 broadcast_shutdown_local(bc, dev); in ___tick_broadcast_oneshot_control()
844 } else if (dev->next_event < bc->next_event) { in ___tick_broadcast_oneshot_control()
845 tick_broadcast_set_event(bc, cpu, dev->next_event); in ___tick_broadcast_oneshot_control()
862 clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT); in ___tick_broadcast_oneshot_control()
879 if (dev->next_event == KTIME_MAX) in ___tick_broadcast_oneshot_control()
914 if (dev->next_event <= now) { in ___tick_broadcast_oneshot_control()
922 tick_program_event(dev->next_event, 1); in ___tick_broadcast_oneshot_control()
934 struct clock_event_device *dev, *wd; in tick_oneshot_wakeup_control() local
936 dev = td->evtdev; in tick_oneshot_wakeup_control()
946 clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED); in tick_oneshot_wakeup_control()
948 clockevents_program_event(wd, dev->next_event, 1); in tick_oneshot_wakeup_control()