Lines Matching refs:t
32 struct iio_sw_trigger_type *t = NULL, *iter; in __iio_find_sw_trigger_type() local
36 t = iter; in __iio_find_sw_trigger_type()
40 return t; in __iio_find_sw_trigger_type()
43 int iio_register_sw_trigger_type(struct iio_sw_trigger_type *t) in iio_register_sw_trigger_type() argument
49 iter = __iio_find_sw_trigger_type(t->name, strlen(t->name)); in iio_register_sw_trigger_type()
53 list_add_tail(&t->list, &iio_trigger_types_list); in iio_register_sw_trigger_type()
59 t->group = configfs_register_default_group(iio_triggers_group, t->name, in iio_register_sw_trigger_type()
61 if (IS_ERR(t->group)) { in iio_register_sw_trigger_type()
63 list_del(&t->list); in iio_register_sw_trigger_type()
65 ret = PTR_ERR(t->group); in iio_register_sw_trigger_type()
72 void iio_unregister_sw_trigger_type(struct iio_sw_trigger_type *t) in iio_unregister_sw_trigger_type() argument
77 iter = __iio_find_sw_trigger_type(t->name, strlen(t->name)); in iio_unregister_sw_trigger_type()
79 list_del(&t->list); in iio_unregister_sw_trigger_type()
82 configfs_unregister_default_group(t->group); in iio_unregister_sw_trigger_type()
89 struct iio_sw_trigger_type *t; in iio_get_sw_trigger_type() local
92 t = __iio_find_sw_trigger_type(name, strlen(name)); in iio_get_sw_trigger_type()
93 if (t && !try_module_get(t->owner)) in iio_get_sw_trigger_type()
94 t = NULL; in iio_get_sw_trigger_type()
97 return t; in iio_get_sw_trigger_type()
102 struct iio_sw_trigger *t; in iio_sw_trigger_create() local
110 t = tt->ops->probe(name); in iio_sw_trigger_create()
111 if (IS_ERR(t)) in iio_sw_trigger_create()
114 t->trigger_type = tt; in iio_sw_trigger_create()
116 return t; in iio_sw_trigger_create()
119 return t; in iio_sw_trigger_create()
123 void iio_sw_trigger_destroy(struct iio_sw_trigger *t) in iio_sw_trigger_destroy() argument
125 struct iio_sw_trigger_type *tt = t->trigger_type; in iio_sw_trigger_destroy()
127 tt->ops->remove(t); in iio_sw_trigger_destroy()
135 struct iio_sw_trigger *t; in trigger_make_group() local
137 t = iio_sw_trigger_create(group->cg_item.ci_name, name); in trigger_make_group()
138 if (IS_ERR(t)) in trigger_make_group()
139 return ERR_CAST(t); in trigger_make_group()
141 config_item_set_name(&t->group.cg_item, "%s", name); in trigger_make_group()
143 return &t->group; in trigger_make_group()
149 struct iio_sw_trigger *t = to_iio_sw_trigger(item); in trigger_drop_group() local
151 iio_sw_trigger_destroy(t); in trigger_drop_group()