Lines Matching defs:ced

105 	struct clock_event_device ced;
550 if (clockevent_state_oneshot(&ch->ced)) {
555 ch->ced.event_handler(&ch->ced);
566 if ((clockevent_state_shutdown(&ch->ced))
731 static struct sh_cmt_channel *ced_to_sh_cmt(struct clock_event_device *ced)
733 return container_of(ced, struct sh_cmt_channel, ced);
746 static int sh_cmt_clock_event_shutdown(struct clock_event_device *ced)
748 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
754 static int sh_cmt_clock_event_set_state(struct clock_event_device *ced,
757 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
760 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced))
769 static int sh_cmt_clock_event_set_oneshot(struct clock_event_device *ced)
771 return sh_cmt_clock_event_set_state(ced, 0);
774 static int sh_cmt_clock_event_set_periodic(struct clock_event_device *ced)
776 return sh_cmt_clock_event_set_state(ced, 1);
780 struct clock_event_device *ced)
782 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
784 BUG_ON(!clockevent_state_oneshot(ced));
793 static void sh_cmt_clock_event_suspend(struct clock_event_device *ced)
795 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
801 static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
803 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
812 struct clock_event_device *ced = &ch->ced;
829 ced->name = name;
830 ced->features = CLOCK_EVT_FEAT_PERIODIC;
831 ced->features |= CLOCK_EVT_FEAT_ONESHOT;
832 ced->rating = 125;
833 ced->cpumask = cpu_possible_mask;
834 ced->set_next_event = sh_cmt_clock_event_next;
835 ced->set_state_shutdown = sh_cmt_clock_event_shutdown;
836 ced->set_state_periodic = sh_cmt_clock_event_set_periodic;
837 ced->set_state_oneshot = sh_cmt_clock_event_set_oneshot;
838 ced->suspend = sh_cmt_clock_event_suspend;
839 ced->resume = sh_cmt_clock_event_resume;
842 ced->shift = 32;
843 ced->mult = div_sc(ch->cmt->rate, NSEC_PER_SEC, ced->shift);
844 ced->max_delta_ns = clockevent_delta2ns(ch->max_match_value, ced);
845 ced->max_delta_ticks = ch->max_match_value;
846 ced->min_delta_ns = clockevent_delta2ns(0x1f, ced);
847 ced->min_delta_ticks = 0x1f;
851 clockevents_register_device(ced);