Lines Matching refs:trig_info
67 int iio_trigger_register(struct iio_trigger *trig_info) in iio_trigger_register() argument
71 trig_info->id = ida_alloc(&iio_trigger_ida, GFP_KERNEL); in iio_trigger_register()
72 if (trig_info->id < 0) in iio_trigger_register()
73 return trig_info->id; in iio_trigger_register()
76 dev_set_name(&trig_info->dev, "trigger%d", trig_info->id); in iio_trigger_register()
78 ret = device_add(&trig_info->dev); in iio_trigger_register()
84 if (__iio_trigger_find_by_name(trig_info->name)) { in iio_trigger_register()
85 pr_err("Duplicate trigger name '%s'\n", trig_info->name); in iio_trigger_register()
89 list_add_tail(&trig_info->list, &iio_trigger_list); in iio_trigger_register()
96 device_del(&trig_info->dev); in iio_trigger_register()
98 ida_free(&iio_trigger_ida, trig_info->id); in iio_trigger_register()
103 void iio_trigger_unregister(struct iio_trigger *trig_info) in iio_trigger_unregister() argument
106 list_del(&trig_info->list); in iio_trigger_unregister()
109 ida_free(&iio_trigger_ida, trig_info->id); in iio_trigger_unregister()
111 device_del(&trig_info->dev); in iio_trigger_unregister()
713 struct iio_trigger *trig_info) in devm_iio_trigger_register() argument
717 ret = iio_trigger_register(trig_info); in devm_iio_trigger_register()
721 return devm_add_action_or_reset(dev, devm_iio_trigger_unreg, trig_info); in devm_iio_trigger_register()