Lines Matching refs:ced

42 	struct clock_event_device ced;  member
234 if (clockevent_state_oneshot(&ch->ced)) in sh_tmu_interrupt()
240 ch->ced.event_handler(&ch->ced); in sh_tmu_interrupt()
330 static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced) in ced_to_sh_tmu() argument
332 return container_of(ced, struct sh_tmu_channel, ced); in ced_to_sh_tmu()
345 static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced) in sh_tmu_clock_event_shutdown() argument
347 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_shutdown()
349 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_shutdown()
354 static int sh_tmu_clock_event_set_state(struct clock_event_device *ced, in sh_tmu_clock_event_set_state() argument
357 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_set_state()
360 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_set_state()
369 static int sh_tmu_clock_event_set_oneshot(struct clock_event_device *ced) in sh_tmu_clock_event_set_oneshot() argument
371 return sh_tmu_clock_event_set_state(ced, 0); in sh_tmu_clock_event_set_oneshot()
374 static int sh_tmu_clock_event_set_periodic(struct clock_event_device *ced) in sh_tmu_clock_event_set_periodic() argument
376 return sh_tmu_clock_event_set_state(ced, 1); in sh_tmu_clock_event_set_periodic()
380 struct clock_event_device *ced) in sh_tmu_clock_event_next() argument
382 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_next()
384 BUG_ON(!clockevent_state_oneshot(ced)); in sh_tmu_clock_event_next()
391 static void sh_tmu_clock_event_suspend(struct clock_event_device *ced) in sh_tmu_clock_event_suspend() argument
393 pm_genpd_syscore_poweroff(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_suspend()
396 static void sh_tmu_clock_event_resume(struct clock_event_device *ced) in sh_tmu_clock_event_resume() argument
398 pm_genpd_syscore_poweron(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_resume()
404 struct clock_event_device *ced = &ch->ced; in sh_tmu_register_clockevent() local
407 ced->name = name; in sh_tmu_register_clockevent()
408 ced->features = CLOCK_EVT_FEAT_PERIODIC; in sh_tmu_register_clockevent()
409 ced->features |= CLOCK_EVT_FEAT_ONESHOT; in sh_tmu_register_clockevent()
410 ced->rating = 200; in sh_tmu_register_clockevent()
411 ced->cpumask = cpu_possible_mask; in sh_tmu_register_clockevent()
412 ced->set_next_event = sh_tmu_clock_event_next; in sh_tmu_register_clockevent()
413 ced->set_state_shutdown = sh_tmu_clock_event_shutdown; in sh_tmu_register_clockevent()
414 ced->set_state_periodic = sh_tmu_clock_event_set_periodic; in sh_tmu_register_clockevent()
415 ced->set_state_oneshot = sh_tmu_clock_event_set_oneshot; in sh_tmu_register_clockevent()
416 ced->suspend = sh_tmu_clock_event_suspend; in sh_tmu_register_clockevent()
417 ced->resume = sh_tmu_clock_event_resume; in sh_tmu_register_clockevent()
422 clockevents_config_and_register(ced, ch->tmu->rate, 0x300, 0xffffffff); in sh_tmu_register_clockevent()