Lines Matching refs:ced

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