Lines Matching refs:ced
51 struct clock_event_device ced; member
243 if (clockevent_state_oneshot(&ch->ced)) in sh_tmu_interrupt()
249 ch->ced.event_handler(&ch->ced); in sh_tmu_interrupt()
342 static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced) in ced_to_sh_tmu() argument
344 return container_of(ced, struct sh_tmu_channel, ced); in ced_to_sh_tmu()
349 struct clock_event_device *ced = &ch->ced; in sh_tmu_clock_event_start() local
353 clockevents_config(ced, ch->rate); in sh_tmu_clock_event_start()
361 static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced) in sh_tmu_clock_event_shutdown() argument
363 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_shutdown()
365 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_shutdown()
370 static int sh_tmu_clock_event_set_state(struct clock_event_device *ced, in sh_tmu_clock_event_set_state() argument
373 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_set_state()
376 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_set_state()
385 static int sh_tmu_clock_event_set_oneshot(struct clock_event_device *ced) in sh_tmu_clock_event_set_oneshot() argument
387 return sh_tmu_clock_event_set_state(ced, 0); in sh_tmu_clock_event_set_oneshot()
390 static int sh_tmu_clock_event_set_periodic(struct clock_event_device *ced) in sh_tmu_clock_event_set_periodic() argument
392 return sh_tmu_clock_event_set_state(ced, 1); in sh_tmu_clock_event_set_periodic()
396 struct clock_event_device *ced) in sh_tmu_clock_event_next() argument
398 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_next()
400 BUG_ON(!clockevent_state_oneshot(ced)); in sh_tmu_clock_event_next()
407 static void sh_tmu_clock_event_suspend(struct clock_event_device *ced) in sh_tmu_clock_event_suspend() argument
409 pm_genpd_syscore_poweroff(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_suspend()
412 static void sh_tmu_clock_event_resume(struct clock_event_device *ced) in sh_tmu_clock_event_resume() argument
414 pm_genpd_syscore_poweron(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_resume()
420 struct clock_event_device *ced = &ch->ced; in sh_tmu_register_clockevent() local
423 ced->name = name; in sh_tmu_register_clockevent()
424 ced->features = CLOCK_EVT_FEAT_PERIODIC; in sh_tmu_register_clockevent()
425 ced->features |= CLOCK_EVT_FEAT_ONESHOT; in sh_tmu_register_clockevent()
426 ced->rating = 200; in sh_tmu_register_clockevent()
427 ced->cpumask = cpu_possible_mask; in sh_tmu_register_clockevent()
428 ced->set_next_event = sh_tmu_clock_event_next; in sh_tmu_register_clockevent()
429 ced->set_state_shutdown = sh_tmu_clock_event_shutdown; in sh_tmu_register_clockevent()
430 ced->set_state_periodic = sh_tmu_clock_event_set_periodic; in sh_tmu_register_clockevent()
431 ced->set_state_oneshot = sh_tmu_clock_event_set_oneshot; in sh_tmu_register_clockevent()
432 ced->suspend = sh_tmu_clock_event_suspend; in sh_tmu_register_clockevent()
433 ced->resume = sh_tmu_clock_event_resume; in sh_tmu_register_clockevent()
438 clockevents_config_and_register(ced, 1, 0x300, 0xffffffff); in sh_tmu_register_clockevent()