Lines Matching full:entity

41 		.entity		= UVC_GUID_UVC_PROCESSING,
50 .entity = UVC_GUID_UVC_PROCESSING,
59 .entity = UVC_GUID_UVC_PROCESSING,
69 .entity = UVC_GUID_UVC_PROCESSING,
78 .entity = UVC_GUID_UVC_PROCESSING,
87 .entity = UVC_GUID_UVC_PROCESSING,
96 .entity = UVC_GUID_UVC_PROCESSING,
106 .entity = UVC_GUID_UVC_PROCESSING,
116 .entity = UVC_GUID_UVC_PROCESSING,
125 .entity = UVC_GUID_UVC_PROCESSING,
134 .entity = UVC_GUID_UVC_PROCESSING,
142 .entity = UVC_GUID_UVC_PROCESSING,
150 .entity = UVC_GUID_UVC_PROCESSING,
158 .entity = UVC_GUID_UVC_PROCESSING,
166 .entity = UVC_GUID_UVC_PROCESSING,
175 .entity = UVC_GUID_UVC_PROCESSING,
184 .entity = UVC_GUID_UVC_PROCESSING,
191 .entity = UVC_GUID_UVC_PROCESSING,
198 .entity = UVC_GUID_UVC_CAMERA,
206 .entity = UVC_GUID_UVC_CAMERA,
215 .entity = UVC_GUID_UVC_CAMERA,
223 .entity = UVC_GUID_UVC_CAMERA,
233 .entity = UVC_GUID_UVC_CAMERA,
240 .entity = UVC_GUID_UVC_CAMERA,
250 .entity = UVC_GUID_UVC_CAMERA,
260 .entity = UVC_GUID_UVC_CAMERA,
270 .entity = UVC_GUID_UVC_CAMERA,
278 .entity = UVC_GUID_UVC_CAMERA,
288 .entity = UVC_GUID_UVC_CAMERA,
298 .entity = UVC_GUID_UVC_CAMERA,
308 .entity = UVC_GUID_UVC_CAMERA,
317 .entity = UVC_GUID_UVC_CAMERA,
327 .entity = UVC_GUID_UVC_CAMERA,
337 .entity = UVC_GUID_UVC_CAMERA,
345 .entity = UVC_GUID_UVC_CAMERA,
354 .entity = UVC_GUID_EXT_GPIO_CONTROLLER,
465 .entity = UVC_GUID_UVC_PROCESSING,
474 .entity = UVC_GUID_UVC_PROCESSING,
483 .entity = UVC_GUID_UVC_PROCESSING,
494 .entity = UVC_GUID_UVC_PROCESSING,
503 .entity = UVC_GUID_UVC_PROCESSING,
512 .entity = UVC_GUID_UVC_PROCESSING,
521 .entity = UVC_GUID_UVC_PROCESSING,
530 .entity = UVC_GUID_UVC_PROCESSING,
539 .entity = UVC_GUID_UVC_PROCESSING,
549 .entity = UVC_GUID_UVC_CAMERA,
562 .entity = UVC_GUID_UVC_CAMERA,
571 .entity = UVC_GUID_UVC_CAMERA,
582 .entity = UVC_GUID_UVC_PROCESSING,
592 .entity = UVC_GUID_UVC_PROCESSING,
603 .entity = UVC_GUID_UVC_PROCESSING,
614 .entity = UVC_GUID_UVC_PROCESSING,
625 .entity = UVC_GUID_UVC_PROCESSING,
636 .entity = UVC_GUID_UVC_CAMERA,
647 .entity = UVC_GUID_UVC_CAMERA,
657 .entity = UVC_GUID_UVC_CAMERA,
666 .entity = UVC_GUID_UVC_CAMERA,
675 .entity = UVC_GUID_UVC_CAMERA,
684 .entity = UVC_GUID_UVC_CAMERA,
695 .entity = UVC_GUID_UVC_CAMERA,
704 .entity = UVC_GUID_UVC_CAMERA,
713 .entity = UVC_GUID_UVC_CAMERA,
724 .entity = UVC_GUID_UVC_CAMERA,
735 .entity = UVC_GUID_UVC_CAMERA,
744 .entity = UVC_GUID_EXT_GPIO_CONTROLLER,
755 .entity = UVC_GUID_UVC_PROCESSING,
767 .entity = UVC_GUID_UVC_PROCESSING,
784 .entity = UVC_GUID_UVC_PROCESSING,
891 static int uvc_entity_match_guid(const struct uvc_entity *entity, in uvc_entity_match_guid() argument
894 return memcmp(entity->guid, guid, sizeof(entity->guid)) == 0; in uvc_entity_match_guid()
901 static void __uvc_find_control(struct uvc_entity *entity, u32 v4l2_id, in __uvc_find_control() argument
909 if (entity == NULL) in __uvc_find_control()
912 for (i = 0; i < entity->ncontrols; ++i) { in __uvc_find_control()
913 ctrl = &entity->controls[i]; in __uvc_find_control()
937 struct uvc_entity *entity; in uvc_find_control() local
946 list_for_each_entry(entity, &chain->entities, chain) { in uvc_find_control()
947 __uvc_find_control(entity, v4l2_id, mapping, &ctrl, next); in uvc_find_control()
965 ret = uvc_query_ctrl(chain->dev, UVC_GET_DEF, ctrl->entity->id, in uvc_ctrl_populate_cache()
974 ret = uvc_query_ctrl(chain->dev, UVC_GET_MIN, ctrl->entity->id, in uvc_ctrl_populate_cache()
982 ret = uvc_query_ctrl(chain->dev, UVC_GET_MAX, ctrl->entity->id, in uvc_ctrl_populate_cache()
990 ret = uvc_query_ctrl(chain->dev, UVC_GET_RES, ctrl->entity->id, in uvc_ctrl_populate_cache()
995 if (UVC_ENTITY_TYPE(ctrl->entity) != in uvc_ctrl_populate_cache()
1060 if (ctrl->entity->get_cur) in __uvc_ctrl_load_cur()
1061 ret = ctrl->entity->get_cur(chain->dev, ctrl->entity, in __uvc_ctrl_load_cur()
1066 ctrl->entity->id, chain->dev->intfnum, in __uvc_ctrl_load_cur()
1190 __uvc_find_control(ctrl->entity, mapping->master_id, &master_map, in uvc_ctrl_is_accessible()
1258 __uvc_find_control(ctrl->entity, mapping->master_id, in __uvc_query_v4l2_ctrl()
1525 __uvc_find_control(master->entity, slave_id, &mapping, &ctrl, 0); in uvc_ctrl_send_slave_event()
1767 struct uvc_entity *entity, int rollback, struct uvc_control **err_ctrl) in uvc_ctrl_commit_entity() argument
1773 if (entity == NULL) in uvc_ctrl_commit_entity()
1776 for (i = 0; i < entity->ncontrols; ++i) { in uvc_ctrl_commit_entity()
1777 ctrl = &entity->controls[i]; in uvc_ctrl_commit_entity()
1796 ret = uvc_query_ctrl(dev, UVC_SET_CUR, ctrl->entity->id, in uvc_ctrl_commit_entity()
1820 static int uvc_ctrl_find_ctrl_idx(struct uvc_entity *entity, in uvc_ctrl_find_ctrl_idx() argument
1828 if (!entity) in uvc_ctrl_find_ctrl_idx()
1832 __uvc_find_control(entity, ctrls->controls[i].id, &mapping, in uvc_ctrl_find_ctrl_idx()
1846 struct uvc_entity *entity; in __uvc_ctrl_commit() local
1850 list_for_each_entry(entity, &chain->entities, chain) { in __uvc_ctrl_commit()
1851 ret = uvc_ctrl_commit_entity(chain->dev, entity, rollback, in __uvc_ctrl_commit()
1861 ctrls->error_idx = uvc_ctrl_find_ctrl_idx(entity, ctrls, in __uvc_ctrl_commit()
2026 if (ctrl->entity->get_info) in uvc_ctrl_get_flags()
2027 ret = ctrl->entity->get_info(dev, ctrl->entity, in uvc_ctrl_get_flags()
2030 ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, in uvc_ctrl_get_flags()
2051 u8 entity; in uvc_ctrl_fixup_xu_info() member
2077 if (fixups[i].entity == ctrl->entity->id && in uvc_ctrl_fixup_xu_info()
2098 memcpy(info->entity, ctrl->entity->guid, sizeof(info->entity)); in uvc_ctrl_fill_xu_info()
2103 ret = uvc_query_ctrl(dev, UVC_GET_LEN, ctrl->entity->id, dev->intfnum, in uvc_ctrl_fill_xu_info()
2108 info->entity, info->selector, ret); in uvc_ctrl_fill_xu_info()
2121 info->entity, info->selector, ret); in uvc_ctrl_fill_xu_info()
2129 info->entity, info->selector, info->size, in uvc_ctrl_fill_xu_info()
2158 "Failed to initialize control %pUl/%u on device %s entity %u\n", in uvc_ctrl_init_xu_ctrl()
2159 info.entity, info.selector, dev->udev->devpath, in uvc_ctrl_init_xu_ctrl()
2160 ctrl->entity->id); in uvc_ctrl_init_xu_ctrl()
2168 struct uvc_entity *entity; in uvc_xu_ctrl_query() local
2179 list_for_each_entry(entity, &chain->entities, chain) { in uvc_xu_ctrl_query()
2180 if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT && in uvc_xu_ctrl_query()
2181 entity->id == xqry->unit) { in uvc_xu_ctrl_query()
2195 for (i = 0; i < entity->ncontrols; ++i) { in uvc_xu_ctrl_query()
2196 ctrl = &entity->controls[i]; in uvc_xu_ctrl_query()
2205 entity->guid, xqry->selector); in uvc_xu_ctrl_query()
2304 struct uvc_entity *entity; in uvc_ctrl_restore_values() local
2309 list_for_each_entry(entity, &dev->entities, list) { in uvc_ctrl_restore_values()
2311 for (i = 0; i < entity->ncontrols; ++i) { in uvc_ctrl_restore_values()
2312 ctrl = &entity->controls[i]; in uvc_ctrl_restore_values()
2319 ctrl->info.entity, ctrl->info.index, in uvc_ctrl_restore_values()
2324 ret = uvc_ctrl_commit_entity(dev, entity, 0, NULL); in uvc_ctrl_restore_values()
2353 uvc_dbg(dev, CONTROL, "Added control %pUl/%u to device %s entity %u\n", in uvc_ctrl_add_info()
2354 ctrl->info.entity, ctrl->info.selector, dev->udev->devpath, in uvc_ctrl_add_info()
2355 ctrl->entity->id); in uvc_ctrl_add_info()
2424 uvc_map_get_name(map), ctrl->info.entity, in __uvc_ctrl_add_mapping()
2442 struct uvc_entity *entity; in uvc_ctrl_add_mapping() local
2455 list_for_each_entry(entity, &chain->entities, chain) { in uvc_ctrl_add_mapping()
2458 if (UVC_ENTITY_TYPE(entity) != UVC_VC_EXTENSION_UNIT || in uvc_ctrl_add_mapping()
2459 !uvc_entity_match_guid(entity, mapping->entity)) in uvc_ctrl_add_mapping()
2462 for (i = 0; i < entity->ncontrols; ++i) { in uvc_ctrl_add_mapping()
2463 ctrl = &entity->controls[i]; in uvc_ctrl_add_mapping()
2523 * Prune an entity of its bogus controls using a blacklist. Bogus controls
2528 struct uvc_entity *entity) in uvc_ctrl_prune_entity() argument
2550 switch (UVC_ENTITY_TYPE(entity)) { in uvc_ctrl_prune_entity()
2554 controls = entity->processing.bmControls; in uvc_ctrl_prune_entity()
2555 size = entity->processing.bControlSize; in uvc_ctrl_prune_entity()
2561 controls = entity->camera.bmControls; in uvc_ctrl_prune_entity()
2562 size = entity->camera.bControlSize; in uvc_ctrl_prune_entity()
2579 entity->id, blacklist[i].index); in uvc_ctrl_prune_entity()
2601 if (UVC_ENTITY_TYPE(ctrl->entity) == UVC_VC_EXTENSION_UNIT) in uvc_ctrl_init_ctrl()
2607 if (uvc_entity_match_guid(ctrl->entity, info->entity) && in uvc_ctrl_init_ctrl()
2638 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && in uvc_ctrl_init_ctrl()
2653 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && in uvc_ctrl_init_ctrl()
2665 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && in uvc_ctrl_init_ctrl()
2676 struct uvc_entity *entity; in uvc_ctrl_init_chain() local
2680 list_for_each_entry(entity, &chain->entities, chain) { in uvc_ctrl_init_chain()
2685 if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT) { in uvc_ctrl_init_chain()
2686 bmControls = entity->extension.bmControls; in uvc_ctrl_init_chain()
2687 bControlSize = entity->extension.bControlSize; in uvc_ctrl_init_chain()
2688 } else if (UVC_ENTITY_TYPE(entity) == UVC_VC_PROCESSING_UNIT) { in uvc_ctrl_init_chain()
2689 bmControls = entity->processing.bmControls; in uvc_ctrl_init_chain()
2690 bControlSize = entity->processing.bControlSize; in uvc_ctrl_init_chain()
2691 } else if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) { in uvc_ctrl_init_chain()
2692 bmControls = entity->camera.bmControls; in uvc_ctrl_init_chain()
2693 bControlSize = entity->camera.bControlSize; in uvc_ctrl_init_chain()
2694 } else if (UVC_ENTITY_TYPE(entity) == UVC_EXT_GPIO_UNIT) { in uvc_ctrl_init_chain()
2695 bmControls = entity->gpio.bmControls; in uvc_ctrl_init_chain()
2696 bControlSize = entity->gpio.bControlSize; in uvc_ctrl_init_chain()
2700 uvc_ctrl_prune_entity(chain->dev, entity); in uvc_ctrl_init_chain()
2707 entity->controls = kcalloc(ncontrols, sizeof(*ctrl), in uvc_ctrl_init_chain()
2709 if (entity->controls == NULL) in uvc_ctrl_init_chain()
2711 entity->ncontrols = ncontrols; in uvc_ctrl_init_chain()
2714 ctrl = entity->controls; in uvc_ctrl_init_chain()
2719 ctrl->entity = entity; in uvc_ctrl_init_chain()
2765 struct uvc_entity *entity; in uvc_ctrl_cleanup_device() local
2773 list_for_each_entry(entity, &dev->entities, list) { in uvc_ctrl_cleanup_device()
2774 for (i = 0; i < entity->ncontrols; ++i) { in uvc_ctrl_cleanup_device()
2775 struct uvc_control *ctrl = &entity->controls[i]; in uvc_ctrl_cleanup_device()
2784 kfree(entity->controls); in uvc_ctrl_cleanup_device()