• Home
  • Raw
  • Download

Lines Matching refs:dev

162 void tick_install_broadcast_device(struct clock_event_device *dev, int cpu)  in tick_install_broadcast_device()  argument
166 if (tick_set_oneshot_wakeup_device(dev, cpu)) in tick_install_broadcast_device()
169 if (!tick_check_broadcast_device(cur, dev)) in tick_install_broadcast_device()
172 if (!try_module_get(dev->owner)) in tick_install_broadcast_device()
175 clockevents_exchange_device(cur, dev); in tick_install_broadcast_device()
178 tick_broadcast_device.evtdev = dev; in tick_install_broadcast_device()
180 tick_broadcast_start_periodic(dev); in tick_install_broadcast_device()
182 if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT)) in tick_install_broadcast_device()
208 int tick_is_broadcast_device(struct clock_event_device *dev) in tick_is_broadcast_device() argument
210 return (dev && tick_broadcast_device.evtdev == dev); in tick_is_broadcast_device()
213 int tick_broadcast_update_freq(struct clock_event_device *dev, u32 freq) in tick_broadcast_update_freq() argument
217 if (tick_is_broadcast_device(dev)) { in tick_broadcast_update_freq()
219 ret = __clockevents_update_freq(dev, freq); in tick_broadcast_update_freq()
231 static void tick_device_setup_broadcast_func(struct clock_event_device *dev) in tick_device_setup_broadcast_func() argument
233 if (!dev->broadcast) in tick_device_setup_broadcast_func()
234 dev->broadcast = tick_broadcast; in tick_device_setup_broadcast_func()
235 if (!dev->broadcast) { in tick_device_setup_broadcast_func()
237 dev->name); in tick_device_setup_broadcast_func()
238 dev->broadcast = err_broadcast; in tick_device_setup_broadcast_func()
246 int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) in tick_device_uses_broadcast() argument
260 if (!tick_device_is_functional(dev)) { in tick_device_uses_broadcast()
261 dev->event_handler = tick_handle_periodic; in tick_device_uses_broadcast()
262 tick_device_setup_broadcast_func(dev); in tick_device_uses_broadcast()
274 if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_device_uses_broadcast()
277 tick_device_setup_broadcast_func(dev); in tick_device_uses_broadcast()
399 static void tick_handle_periodic_broadcast(struct clock_event_device *dev) in tick_handle_periodic_broadcast() argument
414 if (clockevent_state_oneshot(dev)) { in tick_handle_periodic_broadcast()
415 ktime_t next = ktime_add_ns(dev->next_event, TICK_NSEC); in tick_handle_periodic_broadcast()
417 clockevents_program_event(dev, next, true); in tick_handle_periodic_broadcast()
439 struct clock_event_device *bc, *dev; in tick_broadcast_control() local
447 dev = td->evtdev; in tick_broadcast_control()
452 if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_broadcast_control()
455 if (!tick_device_is_functional(dev)) in tick_broadcast_control()
479 clockevents_shutdown(dev); in tick_broadcast_control()
490 tick_setup_periodic(dev, 0); in tick_broadcast_control()
514 void tick_set_periodic_handler(struct clock_event_device *dev, int broadcast) in tick_set_periodic_handler() argument
517 dev->event_handler = tick_handle_periodic; in tick_set_periodic_handler()
519 dev->event_handler = tick_handle_periodic_broadcast; in tick_set_periodic_handler()
685 static void tick_handle_oneshot_broadcast(struct clock_event_device *dev) in tick_handle_oneshot_broadcast() argument
693 dev->next_event = KTIME_MAX; in tick_handle_oneshot_broadcast()
755 tick_broadcast_set_event(dev, next_cpu, next_event); in tick_handle_oneshot_broadcast()
775 struct clock_event_device *dev) in broadcast_shutdown_local() argument
785 if (dev->next_event < bc->next_event) in broadcast_shutdown_local()
788 clockevents_switch_state(dev, CLOCK_EVT_STATE_SHUTDOWN); in broadcast_shutdown_local()
795 struct clock_event_device *bc, *dev = td->evtdev; in ___tick_broadcast_oneshot_control() local
829 broadcast_shutdown_local(bc, dev); in ___tick_broadcast_oneshot_control()
843 } else if (dev->next_event < bc->next_event) { in ___tick_broadcast_oneshot_control()
844 tick_broadcast_set_event(bc, cpu, dev->next_event); in ___tick_broadcast_oneshot_control()
861 clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT); in ___tick_broadcast_oneshot_control()
878 if (dev->next_event == KTIME_MAX) in ___tick_broadcast_oneshot_control()
913 if (dev->next_event <= now) { in ___tick_broadcast_oneshot_control()
921 tick_program_event(dev->next_event, 1); in ___tick_broadcast_oneshot_control()
933 struct clock_event_device *dev, *wd; in tick_oneshot_wakeup_control() local
935 dev = td->evtdev; in tick_oneshot_wakeup_control()
945 clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED); in tick_oneshot_wakeup_control()
947 clockevents_program_event(wd, dev->next_event, 1); in tick_oneshot_wakeup_control()