Lines Matching refs:ced

46 	struct clock_event_device ced;  member
238 if (clockevent_state_oneshot(&ch->ced)) in sh_tmu_interrupt()
244 ch->ced.event_handler(&ch->ced); in sh_tmu_interrupt()
334 static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced) in ced_to_sh_tmu() argument
336 return container_of(ced, struct sh_tmu_channel, ced); in ced_to_sh_tmu()
349 static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced) in sh_tmu_clock_event_shutdown() argument
351 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_shutdown()
353 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_shutdown()
358 static int sh_tmu_clock_event_set_state(struct clock_event_device *ced, in sh_tmu_clock_event_set_state() argument
361 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_set_state()
364 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_set_state()
373 static int sh_tmu_clock_event_set_oneshot(struct clock_event_device *ced) in sh_tmu_clock_event_set_oneshot() argument
375 return sh_tmu_clock_event_set_state(ced, 0); in sh_tmu_clock_event_set_oneshot()
378 static int sh_tmu_clock_event_set_periodic(struct clock_event_device *ced) in sh_tmu_clock_event_set_periodic() argument
380 return sh_tmu_clock_event_set_state(ced, 1); in sh_tmu_clock_event_set_periodic()
384 struct clock_event_device *ced) in sh_tmu_clock_event_next() argument
386 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_next()
388 BUG_ON(!clockevent_state_oneshot(ced)); in sh_tmu_clock_event_next()
395 static void sh_tmu_clock_event_suspend(struct clock_event_device *ced) in sh_tmu_clock_event_suspend() argument
397 dev_pm_genpd_suspend(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_suspend()
400 static void sh_tmu_clock_event_resume(struct clock_event_device *ced) in sh_tmu_clock_event_resume() argument
402 dev_pm_genpd_resume(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_resume()
408 struct clock_event_device *ced = &ch->ced; in sh_tmu_register_clockevent() local
411 ced->name = name; in sh_tmu_register_clockevent()
412 ced->features = CLOCK_EVT_FEAT_PERIODIC; in sh_tmu_register_clockevent()
413 ced->features |= CLOCK_EVT_FEAT_ONESHOT; in sh_tmu_register_clockevent()
414 ced->rating = 200; in sh_tmu_register_clockevent()
415 ced->cpumask = cpu_possible_mask; in sh_tmu_register_clockevent()
416 ced->set_next_event = sh_tmu_clock_event_next; in sh_tmu_register_clockevent()
417 ced->set_state_shutdown = sh_tmu_clock_event_shutdown; in sh_tmu_register_clockevent()
418 ced->set_state_periodic = sh_tmu_clock_event_set_periodic; in sh_tmu_register_clockevent()
419 ced->set_state_oneshot = sh_tmu_clock_event_set_oneshot; in sh_tmu_register_clockevent()
420 ced->suspend = sh_tmu_clock_event_suspend; in sh_tmu_register_clockevent()
421 ced->resume = sh_tmu_clock_event_resume; in sh_tmu_register_clockevent()
426 clockevents_config_and_register(ced, ch->tmu->rate, 0x300, 0xffffffff); in sh_tmu_register_clockevent()