Lines Matching full:entity
18 struct uvc_entity *entity) in uvc_mc_create_links() argument
25 sink = (UVC_ENTITY_TYPE(entity) == UVC_TT_STREAMING) in uvc_mc_create_links()
26 ? (entity->vdev ? &entity->vdev->entity : NULL) in uvc_mc_create_links()
27 : &entity->subdev.entity; in uvc_mc_create_links()
31 for (i = 0; i < entity->num_pads; ++i) { in uvc_mc_create_links()
36 if (!(entity->pads[i].flags & MEDIA_PAD_FL_SINK)) in uvc_mc_create_links()
39 remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]); in uvc_mc_create_links()
44 ? (remote->vdev ? &remote->vdev->entity : NULL) in uvc_mc_create_links()
45 : &remote->subdev.entity; in uvc_mc_create_links()
62 void uvc_mc_cleanup_entity(struct uvc_entity *entity) in uvc_mc_cleanup_entity() argument
64 if (UVC_ENTITY_TYPE(entity) != UVC_TT_STREAMING) in uvc_mc_cleanup_entity()
65 media_entity_cleanup(&entity->subdev.entity); in uvc_mc_cleanup_entity()
66 else if (entity->vdev != NULL) in uvc_mc_cleanup_entity()
67 media_entity_cleanup(&entity->vdev->entity); in uvc_mc_cleanup_entity()
71 struct uvc_entity *entity) in uvc_mc_init_entity() argument
75 if (UVC_ENTITY_TYPE(entity) != UVC_TT_STREAMING) { in uvc_mc_init_entity()
78 v4l2_subdev_init(&entity->subdev, &uvc_subdev_ops); in uvc_mc_init_entity()
79 strscpy(entity->subdev.name, entity->name, in uvc_mc_init_entity()
80 sizeof(entity->subdev.name)); in uvc_mc_init_entity()
82 switch (UVC_ENTITY_TYPE(entity)) { in uvc_mc_init_entity()
114 entity->subdev.entity.function = function; in uvc_mc_init_entity()
116 ret = media_entity_pads_init(&entity->subdev.entity, in uvc_mc_init_entity()
117 entity->num_pads, entity->pads); in uvc_mc_init_entity()
123 &entity->subdev); in uvc_mc_init_entity()
124 } else if (entity->vdev != NULL) { in uvc_mc_init_entity()
125 ret = media_entity_pads_init(&entity->vdev->entity, in uvc_mc_init_entity()
126 entity->num_pads, entity->pads); in uvc_mc_init_entity()
127 if (entity->flags & UVC_ENTITY_FLAG_DEFAULT) in uvc_mc_init_entity()
128 entity->vdev->entity.flags |= MEDIA_ENT_FL_DEFAULT; in uvc_mc_init_entity()
137 struct uvc_entity *entity; in uvc_mc_register_entities() local
140 list_for_each_entry(entity, &chain->entities, chain) { in uvc_mc_register_entities()
141 ret = uvc_mc_init_entity(chain, entity); in uvc_mc_register_entities()
144 "Failed to initialize entity for entity %u\n", in uvc_mc_register_entities()
145 entity->id); in uvc_mc_register_entities()
150 list_for_each_entry(entity, &chain->entities, chain) { in uvc_mc_register_entities()
151 ret = uvc_mc_create_links(chain, entity); in uvc_mc_register_entities()
154 "Failed to create links for entity %u\n", in uvc_mc_register_entities()
155 entity->id); in uvc_mc_register_entities()