Lines Matching refs:iface

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