Lines Matching refs:iface
49 struct most_interface *iface; member
105 if (c->iface->dma_free) in most_free_mbo_coherent()
106 c->iface->dma_free(mbo, coherent_buf_size); in most_free_mbo_coherent()
176 if (c->iface->channel_vector[i].direction & MOST_CH_RX) in available_directions_show()
178 if (c->iface->channel_vector[i].direction & MOST_CH_TX) in available_directions_show()
192 if (c->iface->channel_vector[i].data_type & MOST_CH_CONTROL) in available_datatypes_show()
194 if (c->iface->channel_vector[i].data_type & MOST_CH_ASYNC) in available_datatypes_show()
196 if (c->iface->channel_vector[i].data_type & MOST_CH_SYNC) in available_datatypes_show()
198 if (c->iface->channel_vector[i].data_type & MOST_CH_ISOC) in available_datatypes_show()
212 c->iface->channel_vector[i].num_buffers_packet); in number_of_packet_buffers_show()
223 c->iface->channel_vector[i].num_buffers_streaming); in number_of_stream_buffers_show()
234 c->iface->channel_vector[i].buffer_size_packet); in size_of_packet_buffer_show()
245 c->iface->channel_vector[i].buffer_size_streaming); in size_of_stream_buffer_show()
338 (c->iface->interface != ITYPE_MEDIALB_DIM2)) in channel_attr_is_visible()
341 (c->iface->interface != ITYPE_USB)) in channel_attr_is_visible()
396 struct most_interface *iface = dev_get_drvdata(dev); in description_show() local
398 return snprintf(buf, PAGE_SIZE, "%s\n", iface->description); in description_show()
405 struct most_interface *iface = dev_get_drvdata(dev); in interface_show() local
407 switch (iface->interface) { in interface_show()
470 struct most_interface *iface = dev_get_drvdata(dev); in print_links() local
472 list_for_each_entry(c, &iface->p->channel_list, list) { in print_links()
478 dev_name(iface->dev), in print_links()
486 dev_name(iface->dev), in print_links()
535 struct most_interface *iface; in get_channel() local
542 iface = dev_get_drvdata(dev); in get_channel()
543 list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) { in get_channel()
567 ret = comp->probe_channel(c->iface, c->channel_id, &c->cfg, name, in link_channel_to_component()
701 if (comp->disconnect_channel(c->iface, c->channel_id)) in most_remove_link()
776 typeof(c->iface->enqueue) enqueue = c->iface->enqueue; in hdm_enqueue_thread()
853 c->pipe0.comp->tx_completion(c->iface, c->channel_id); in arm_mbo()
856 c->pipe1.comp->tx_completion(c->iface, c->channel_id); in arm_mbo()
888 mbo->ifp = c->iface; in arm_mbo_chain()
890 if (c->iface->dma_alloc) { in arm_mbo_chain()
892 c->iface->dma_alloc(mbo, coherent_buf_size); in arm_mbo_chain()
953 int channel_has_mbo(struct most_interface *iface, int id, in channel_has_mbo() argument
956 struct most_channel *c = iface->p->channel[id]; in channel_has_mbo()
984 struct mbo *most_get_mbo(struct most_interface *iface, int id, in most_get_mbo() argument
992 c = iface->p->channel[id]; in most_get_mbo()
1090 int most_start_channel(struct most_interface *iface, int id, in most_start_channel() argument
1095 struct most_channel *c = iface->p->channel[id]; in most_start_channel()
1104 if (!try_module_get(iface->mod)) { in most_start_channel()
1111 if (c->iface->configure(c->iface, c->channel_id, &c->cfg)) { in most_start_channel()
1148 module_put(iface->mod); in most_start_channel()
1160 int most_stop_channel(struct most_interface *iface, int id, in most_stop_channel() argument
1165 if (unlikely((!iface) || (id >= iface->num_channels) || (id < 0))) { in most_stop_channel()
1169 c = iface->p->channel[id]; in most_stop_channel()
1181 if (iface->mod) in most_stop_channel()
1182 module_put(iface->mod); in most_stop_channel()
1185 if (c->iface->poison_channel(c->iface, c->channel_id)) { in most_stop_channel()
1187 c->iface->description); in most_stop_channel()
1232 struct most_interface *iface; in disconnect_channels() local
1236 iface = dev_get_drvdata(dev); in disconnect_channels()
1237 list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) { in disconnect_channels()
1239 comp->disconnect_channel(c->iface, c->channel_id); in disconnect_channels()
1279 int most_register_interface(struct most_interface *iface) in most_register_interface() argument
1285 if (!iface || !iface->enqueue || !iface->configure || in most_register_interface()
1286 !iface->poison_channel || (iface->num_channels > MAX_CHANNELS)) in most_register_interface()
1291 dev_err(iface->dev, "Failed to allocate device ID\n"); in most_register_interface()
1295 iface->p = kzalloc(sizeof(*iface->p), GFP_KERNEL); in most_register_interface()
1296 if (!iface->p) { in most_register_interface()
1301 INIT_LIST_HEAD(&iface->p->channel_list); in most_register_interface()
1302 iface->p->dev_id = id; in most_register_interface()
1303 strscpy(iface->p->name, iface->description, sizeof(iface->p->name)); in most_register_interface()
1304 iface->dev->bus = &mostbus; in most_register_interface()
1305 iface->dev->groups = interface_attr_groups; in most_register_interface()
1306 dev_set_drvdata(iface->dev, iface); in most_register_interface()
1307 if (device_register(iface->dev)) { in most_register_interface()
1308 dev_err(iface->dev, "Failed to register interface device\n"); in most_register_interface()
1309 kfree(iface->p); in most_register_interface()
1310 put_device(iface->dev); in most_register_interface()
1315 for (i = 0; i < iface->num_channels; i++) { in most_register_interface()
1316 const char *name_suffix = iface->channel_vector[i].name_suffix; in most_register_interface()
1326 c->dev.parent = iface->dev; in most_register_interface()
1329 iface->p->channel[i] = c; in most_register_interface()
1331 c->iface = iface; in most_register_interface()
1350 list_add_tail(&c->list, &iface->p->channel_list); in most_register_interface()
1356 most_interface_register_notify(iface->description); in most_register_interface()
1364 c = iface->p->channel[--i]; in most_register_interface()
1367 kfree(iface->p); in most_register_interface()
1368 device_unregister(iface->dev); in most_register_interface()
1381 void most_deregister_interface(struct most_interface *iface) in most_deregister_interface() argument
1386 for (i = 0; i < iface->num_channels; i++) { in most_deregister_interface()
1387 c = iface->p->channel[i]; in most_deregister_interface()
1389 c->pipe0.comp->disconnect_channel(c->iface, in most_deregister_interface()
1392 c->pipe1.comp->disconnect_channel(c->iface, in most_deregister_interface()
1400 ida_simple_remove(&mdev_id, iface->p->dev_id); in most_deregister_interface()
1401 kfree(iface->p); in most_deregister_interface()
1402 device_unregister(iface->dev); in most_deregister_interface()
1416 void most_stop_enqueue(struct most_interface *iface, int id) in most_stop_enqueue() argument
1418 struct most_channel *c = iface->p->channel[id]; in most_stop_enqueue()
1437 void most_resume_enqueue(struct most_interface *iface, int id) in most_resume_enqueue() argument
1439 struct most_channel *c = iface->p->channel[id]; in most_resume_enqueue()