Lines Matching refs:trig_info

103 	struct iio_hrtimer_info *trig_info;  in iio_trig_hrtimer_set_state()  local
105 trig_info = iio_trigger_get_drvdata(trig); in iio_trig_hrtimer_set_state()
108 hrtimer_start(&trig_info->timer, trig_info->period, in iio_trig_hrtimer_set_state()
111 hrtimer_cancel(&trig_info->timer); in iio_trig_hrtimer_set_state()
122 struct iio_hrtimer_info *trig_info; in iio_trig_hrtimer_probe() local
125 trig_info = kzalloc(sizeof(*trig_info), GFP_KERNEL); in iio_trig_hrtimer_probe()
126 if (!trig_info) in iio_trig_hrtimer_probe()
129 trig_info->swt.trigger = iio_trigger_alloc("%s", name); in iio_trig_hrtimer_probe()
130 if (!trig_info->swt.trigger) { in iio_trig_hrtimer_probe()
135 iio_trigger_set_drvdata(trig_info->swt.trigger, trig_info); in iio_trig_hrtimer_probe()
136 trig_info->swt.trigger->ops = &iio_hrtimer_trigger_ops; in iio_trig_hrtimer_probe()
137 trig_info->swt.trigger->dev.groups = iio_hrtimer_attr_groups; in iio_trig_hrtimer_probe()
139 hrtimer_init(&trig_info->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in iio_trig_hrtimer_probe()
140 trig_info->timer.function = iio_hrtimer_trig_handler; in iio_trig_hrtimer_probe()
142 trig_info->sampling_frequency = HRTIMER_DEFAULT_SAMPLING_FREQUENCY; in iio_trig_hrtimer_probe()
143 trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency; in iio_trig_hrtimer_probe()
145 ret = iio_trigger_register(trig_info->swt.trigger); in iio_trig_hrtimer_probe()
149 iio_swt_group_init_type_name(&trig_info->swt, name, &iio_hrtimer_type); in iio_trig_hrtimer_probe()
150 return &trig_info->swt; in iio_trig_hrtimer_probe()
152 iio_trigger_free(trig_info->swt.trigger); in iio_trig_hrtimer_probe()
154 kfree(trig_info); in iio_trig_hrtimer_probe()
161 struct iio_hrtimer_info *trig_info; in iio_trig_hrtimer_remove() local
163 trig_info = iio_trigger_get_drvdata(swt->trigger); in iio_trig_hrtimer_remove()
168 hrtimer_cancel(&trig_info->timer); in iio_trig_hrtimer_remove()
170 kfree(trig_info); in iio_trig_hrtimer_remove()