Lines Matching refs:opts

191 	struct f_uvc_opts *opts;					\
199 opts = to_f_uvc_opts(opts_item); \
201 mutex_lock(&opts->lock); \
203 mutex_unlock(&opts->lock); \
214 struct f_uvc_opts *opts; \
223 opts = to_f_uvc_opts(opts_item); \
225 mutex_lock(&opts->lock); \
226 if (ch->linked || opts->refcnt) { \
242 mutex_unlock(&opts->lock); \
309 struct f_uvc_opts *opts; \
318 opts = to_f_uvc_opts(opts_item); \
319 pd = &opts->uvc_processing; \
321 mutex_lock(&opts->lock); \
323 mutex_unlock(&opts->lock); \
345 struct f_uvc_opts *opts; in uvcg_default_processing_bm_controls_store() local
353 opts = to_f_uvc_opts(opts_item); in uvcg_default_processing_bm_controls_store()
354 pd = &opts->uvc_processing; in uvcg_default_processing_bm_controls_store()
356 mutex_lock(&opts->lock); in uvcg_default_processing_bm_controls_store()
357 if (opts->refcnt) { in uvcg_default_processing_bm_controls_store()
391 mutex_unlock(&opts->lock); in uvcg_default_processing_bm_controls_store()
400 struct f_uvc_opts *opts; in uvcg_default_processing_bm_controls_show() local
410 opts = to_f_uvc_opts(opts_item); in uvcg_default_processing_bm_controls_show()
411 pd = &opts->uvc_processing; in uvcg_default_processing_bm_controls_show()
413 mutex_lock(&opts->lock); in uvcg_default_processing_bm_controls_show()
418 mutex_unlock(&opts->lock); in uvcg_default_processing_bm_controls_show()
470 struct f_uvc_opts *opts; \
480 opts = to_f_uvc_opts(opts_item); \
481 cd = &opts->uvc_camera_terminal; \
483 mutex_lock(&opts->lock); \
485 mutex_unlock(&opts->lock); \
514 struct f_uvc_opts *opts; in uvcg_default_camera_bm_controls_store() local
523 opts = to_f_uvc_opts(opts_item); in uvcg_default_camera_bm_controls_store()
524 cd = &opts->uvc_camera_terminal; in uvcg_default_camera_bm_controls_store()
526 mutex_lock(&opts->lock); in uvcg_default_camera_bm_controls_store()
527 if (opts->refcnt) { in uvcg_default_camera_bm_controls_store()
561 mutex_unlock(&opts->lock); in uvcg_default_camera_bm_controls_store()
570 struct f_uvc_opts *opts; in uvcg_default_camera_bm_controls_show() local
581 opts = to_f_uvc_opts(opts_item); in uvcg_default_camera_bm_controls_show()
582 cd = &opts->uvc_camera_terminal; in uvcg_default_camera_bm_controls_show()
584 mutex_lock(&opts->lock); in uvcg_default_camera_bm_controls_show()
589 mutex_unlock(&opts->lock); in uvcg_default_camera_bm_controls_show()
643 struct f_uvc_opts *opts; \
653 opts = to_f_uvc_opts(opts_item); \
654 cd = &opts->uvc_output_terminal; \
656 mutex_lock(&opts->lock); \
658 mutex_unlock(&opts->lock); \
678 struct f_uvc_opts *opts; in uvcg_default_output_b_source_id_show() local
688 opts = to_f_uvc_opts(opts_item); in uvcg_default_output_b_source_id_show()
689 cd = &opts->uvc_output_terminal; in uvcg_default_output_b_source_id_show()
691 mutex_lock(&opts->lock); in uvcg_default_output_b_source_id_show()
693 mutex_unlock(&opts->lock); in uvcg_default_output_b_source_id_show()
704 struct f_uvc_opts *opts; in uvcg_default_output_b_source_id_store() local
719 opts = to_f_uvc_opts(opts_item); in uvcg_default_output_b_source_id_store()
720 cd = &opts->uvc_output_terminal; in uvcg_default_output_b_source_id_store()
722 mutex_lock(&opts->lock); in uvcg_default_output_b_source_id_store()
724 mutex_unlock(&opts->lock); in uvcg_default_output_b_source_id_store()
795 struct f_uvc_opts *opts; \
801 opts = to_f_uvc_opts(opts_item); \
803 mutex_lock(&opts->lock); \
805 mutex_unlock(&opts->lock); \
824 struct f_uvc_opts *opts; in uvcg_extension_b_num_controls_store() local
835 opts = to_f_uvc_opts(opts_item); in uvcg_extension_b_num_controls_store()
837 mutex_lock(&opts->lock); in uvcg_extension_b_num_controls_store()
839 mutex_unlock(&opts->lock); in uvcg_extension_b_num_controls_store()
858 struct f_uvc_opts *opts; in uvcg_extension_b_nr_in_pins_store() local
870 opts = to_f_uvc_opts(opts_item); in uvcg_extension_b_nr_in_pins_store()
872 mutex_lock(&opts->lock); in uvcg_extension_b_nr_in_pins_store()
894 mutex_unlock(&opts->lock); in uvcg_extension_b_nr_in_pins_store()
911 struct f_uvc_opts *opts; in uvcg_extension_b_control_size_store() local
923 opts = to_f_uvc_opts(opts_item); in uvcg_extension_b_control_size_store()
925 mutex_lock(&opts->lock); in uvcg_extension_b_control_size_store()
947 mutex_unlock(&opts->lock); in uvcg_extension_b_control_size_store()
961 struct f_uvc_opts *opts; in uvcg_extension_guid_extension_code_show() local
966 opts = to_f_uvc_opts(opts_item); in uvcg_extension_guid_extension_code_show()
968 mutex_lock(&opts->lock); in uvcg_extension_guid_extension_code_show()
970 mutex_unlock(&opts->lock); in uvcg_extension_guid_extension_code_show()
984 struct f_uvc_opts *opts; in uvcg_extension_guid_extension_code_store() local
990 opts = to_f_uvc_opts(opts_item); in uvcg_extension_guid_extension_code_store()
992 mutex_lock(&opts->lock); in uvcg_extension_guid_extension_code_store()
995 mutex_unlock(&opts->lock); in uvcg_extension_guid_extension_code_store()
1013 struct f_uvc_opts *opts; in uvcg_extension_ba_source_id_show() local
1020 opts = to_f_uvc_opts(opts_item); in uvcg_extension_ba_source_id_show()
1022 mutex_lock(&opts->lock); in uvcg_extension_ba_source_id_show()
1027 mutex_unlock(&opts->lock); in uvcg_extension_ba_source_id_show()
1041 struct f_uvc_opts *opts; in uvcg_extension_ba_source_id_store() local
1048 opts = to_f_uvc_opts(opts_item); in uvcg_extension_ba_source_id_store()
1050 mutex_lock(&opts->lock); in uvcg_extension_ba_source_id_store()
1079 mutex_unlock(&opts->lock); in uvcg_extension_ba_source_id_store()
1092 struct f_uvc_opts *opts; in uvcg_extension_bm_controls_show() local
1099 opts = to_f_uvc_opts(opts_item); in uvcg_extension_bm_controls_show()
1101 mutex_lock(&opts->lock); in uvcg_extension_bm_controls_show()
1106 mutex_unlock(&opts->lock); in uvcg_extension_bm_controls_show()
1120 struct f_uvc_opts *opts; in uvcg_extension_bm_controls_store() local
1127 opts = to_f_uvc_opts(opts_item); in uvcg_extension_bm_controls_store()
1129 mutex_lock(&opts->lock); in uvcg_extension_bm_controls_store()
1158 mutex_unlock(&opts->lock); in uvcg_extension_bm_controls_store()
1219 struct f_uvc_opts *opts; in uvcg_extension_drop_link() local
1224 opts = to_f_uvc_opts(opts_item); in uvcg_extension_drop_link()
1226 mutex_lock(&opts->lock); in uvcg_extension_drop_link()
1230 mutex_unlock(&opts->lock); in uvcg_extension_drop_link()
1251 struct f_uvc_opts *opts; in uvcg_extension_drop() local
1254 opts = to_f_uvc_opts(opts_item); in uvcg_extension_drop()
1256 mutex_lock(&opts->lock); in uvcg_extension_drop()
1263 mutex_unlock(&opts->lock); in uvcg_extension_drop()
1270 struct f_uvc_opts *opts; in uvcg_extension_make() local
1273 opts = to_f_uvc_opts(opts_item); in uvcg_extension_make()
1288 mutex_lock(&opts->lock); in uvcg_extension_make()
1290 xu->desc.bUnitID = ++opts->last_unit_id; in uvcg_extension_make()
1293 list_add_tail(&xu->list, &opts->extension_units); in uvcg_extension_make()
1295 mutex_unlock(&opts->lock); in uvcg_extension_make()
1343 struct f_uvc_opts *opts; in uvcg_control_class_allow_link() local
1356 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_allow_link()
1358 mutex_lock(&opts->lock); in uvcg_control_class_allow_link()
1360 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_allow_link()
1363 if (opts->refcnt || class_array[0]) { in uvcg_control_class_allow_link()
1374 mutex_unlock(&opts->lock); in uvcg_control_class_allow_link()
1385 struct f_uvc_opts *opts; in uvcg_control_class_drop_link() local
1397 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_drop_link()
1399 mutex_lock(&opts->lock); in uvcg_control_class_drop_link()
1401 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_drop_link()
1402 if (!class_array || opts->refcnt) in uvcg_control_class_drop_link()
1410 mutex_unlock(&opts->lock); in uvcg_control_class_drop_link()
1472 struct f_uvc_opts *opts; in uvcg_default_control_b_interface_number_show() local
1478 opts = to_f_uvc_opts(opts_item); in uvcg_default_control_b_interface_number_show()
1480 mutex_lock(&opts->lock); in uvcg_default_control_b_interface_number_show()
1481 result += sprintf(page, "%u\n", opts->control_interface); in uvcg_default_control_b_interface_number_show()
1482 mutex_unlock(&opts->lock); in uvcg_default_control_b_interface_number_show()
1497 struct f_uvc_opts *opts; in uvcg_default_control_enable_interrupt_ep_show() local
1503 opts = to_f_uvc_opts(opts_item); in uvcg_default_control_enable_interrupt_ep_show()
1505 mutex_lock(&opts->lock); in uvcg_default_control_enable_interrupt_ep_show()
1506 result += sprintf(page, "%u\n", opts->enable_interrupt_ep); in uvcg_default_control_enable_interrupt_ep_show()
1507 mutex_unlock(&opts->lock); in uvcg_default_control_enable_interrupt_ep_show()
1520 struct f_uvc_opts *opts; in uvcg_default_control_enable_interrupt_ep_store() local
1531 opts = to_f_uvc_opts(opts_item); in uvcg_default_control_enable_interrupt_ep_store()
1533 mutex_lock(&opts->lock); in uvcg_default_control_enable_interrupt_ep_store()
1534 opts->enable_interrupt_ep = num; in uvcg_default_control_enable_interrupt_ep_store()
1535 mutex_unlock(&opts->lock); in uvcg_default_control_enable_interrupt_ep_store()
1672 struct f_uvc_opts *opts; in uvcg_format_bma_controls_show() local
1681 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_show()
1683 mutex_lock(&opts->lock); in uvcg_format_bma_controls_show()
1690 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_show()
1699 struct f_uvc_opts *opts; in uvcg_format_bma_controls_store() local
1707 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_store()
1709 mutex_lock(&opts->lock); in uvcg_format_bma_controls_store()
1710 if (ch->linked || opts->refcnt) { in uvcg_format_bma_controls_store()
1723 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_store()
1740 struct f_uvc_opts *opts; in uvcg_streaming_header_allow_link() local
1750 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_allow_link()
1752 mutex_lock(&opts->lock); in uvcg_streaming_header_allow_link()
1794 mutex_unlock(&opts->lock); in uvcg_streaming_header_allow_link()
1804 struct f_uvc_opts *opts; in uvcg_streaming_header_drop_link() local
1813 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_drop_link()
1815 mutex_lock(&opts->lock); in uvcg_streaming_header_drop_link()
1829 mutex_unlock(&opts->lock); in uvcg_streaming_header_drop_link()
1844 struct f_uvc_opts *opts; \
1852 opts = to_f_uvc_opts(opts_item); \
1854 mutex_lock(&opts->lock); \
1856 mutex_unlock(&opts->lock); \
1928 struct f_uvc_opts *opts; \
1936 opts = to_f_uvc_opts(opts_item); \
1938 mutex_lock(&opts->lock); \
1940 mutex_unlock(&opts->lock); \
1950 struct f_uvc_opts *opts; \
1964 opts = to_f_uvc_opts(opts_item); \
1967 mutex_lock(&opts->lock); \
1968 if (fmt->linked || opts->refcnt) { \
1976 mutex_unlock(&opts->lock); \
1988 struct f_uvc_opts *opts; in uvcg_frame_b_frame_index_show() local
2005 opts = to_f_uvc_opts(opts_item); in uvcg_frame_b_frame_index_show()
2007 mutex_lock(&opts->lock); in uvcg_frame_b_frame_index_show()
2009 mutex_unlock(&opts->lock); in uvcg_frame_b_frame_index_show()
2032 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_show() local
2041 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_show()
2043 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
2048 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
2058 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_store() local
2068 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_store()
2071 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
2072 if (fmt->linked || opts->refcnt) { in uvcg_frame_dw_frame_interval_store()
2101 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
2132 struct f_uvc_opts *opts; in uvcg_frame_make() local
2150 opts = to_f_uvc_opts(opts_item); in uvcg_frame_make()
2152 mutex_lock(&opts->lock); in uvcg_frame_make()
2161 mutex_unlock(&opts->lock); in uvcg_frame_make()
2168 mutex_unlock(&opts->lock); in uvcg_frame_make()
2176 mutex_unlock(&opts->lock); in uvcg_frame_make()
2186 struct f_uvc_opts *opts; in uvcg_frame_drop() local
2192 opts = to_f_uvc_opts(opts_item); in uvcg_frame_drop()
2194 mutex_lock(&opts->lock); in uvcg_frame_drop()
2205 mutex_unlock(&opts->lock); in uvcg_frame_drop()
2239 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_show() local
2246 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_show()
2248 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_show()
2250 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_show()
2261 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_store() local
2271 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_store()
2273 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_store()
2274 if (ch->fmt.linked || opts->refcnt) { in uvcg_uncompressed_guid_format_store()
2293 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_store()
2305 struct f_uvc_opts *opts; \
2313 opts = to_f_uvc_opts(opts_item); \
2315 mutex_lock(&opts->lock); \
2317 mutex_unlock(&opts->lock); \
2330 struct f_uvc_opts *opts; \
2338 opts = to_f_uvc_opts(opts_item); \
2340 mutex_lock(&opts->lock); \
2342 mutex_unlock(&opts->lock); \
2353 struct f_uvc_opts *opts; \
2362 opts = to_f_uvc_opts(opts_item); \
2364 mutex_lock(&opts->lock); \
2365 if (u->fmt.linked || opts->refcnt) { \
2383 mutex_unlock(&opts->lock); \
2503 struct f_uvc_opts *opts; \
2511 opts = to_f_uvc_opts(opts_item); \
2513 mutex_lock(&opts->lock); \
2515 mutex_unlock(&opts->lock); \
2527 struct f_uvc_opts *opts; \
2535 opts = to_f_uvc_opts(opts_item); \
2537 mutex_lock(&opts->lock); \
2539 mutex_unlock(&opts->lock); \
2550 struct f_uvc_opts *opts; \
2559 opts = to_f_uvc_opts(opts_item); \
2561 mutex_lock(&opts->lock); \
2562 if (u->fmt.linked || opts->refcnt) { \
2580 mutex_unlock(&opts->lock); \
2691 struct f_uvc_opts *opts; \
2699 opts = to_f_uvc_opts(opts_item); \
2701 mutex_lock(&opts->lock); \
2704 mutex_unlock(&opts->lock); \
2717 struct f_uvc_opts *opts; \
2734 opts = to_f_uvc_opts(opts_item); \
2736 mutex_lock(&opts->lock); \
2741 mutex_unlock(&opts->lock); \
3088 struct f_uvc_opts *opts; in uvcg_streaming_class_allow_link() local
3103 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_allow_link()
3105 mutex_lock(&opts->lock); in uvcg_streaming_class_allow_link()
3107 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_allow_link()
3108 if (!class_array || *class_array || opts->refcnt) { in uvcg_streaming_class_allow_link()
3150 mutex_unlock(&opts->lock); in uvcg_streaming_class_allow_link()
3161 struct f_uvc_opts *opts; in uvcg_streaming_class_drop_link() local
3173 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_drop_link()
3175 mutex_lock(&opts->lock); in uvcg_streaming_class_drop_link()
3177 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_drop_link()
3181 if (opts->refcnt) in uvcg_streaming_class_drop_link()
3191 mutex_unlock(&opts->lock); in uvcg_streaming_class_drop_link()
3253 struct f_uvc_opts *opts; in uvcg_default_streaming_b_interface_number_show() local
3259 opts = to_f_uvc_opts(opts_item); in uvcg_default_streaming_b_interface_number_show()
3261 mutex_lock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
3262 result += sprintf(page, "%u\n", opts->streaming_interface); in uvcg_default_streaming_b_interface_number_show()
3263 mutex_unlock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
3300 struct f_uvc_opts *opts = to_f_uvc_opts(item); in uvc_func_item_release() local
3303 usb_put_function_instance(&opts->func_inst); in uvc_func_item_release()
3311 struct f_uvc_opts *opts; in uvc_func_allow_link() local
3326 opts = to_f_uvc_opts(src); in uvc_func_allow_link()
3327 mutex_lock(&opts->lock); in uvc_func_allow_link()
3330 opts->iad_index = string->usb_string.id; in uvc_func_allow_link()
3332 opts->vs0_index = string->usb_string.id; in uvc_func_allow_link()
3334 opts->vs1_index = string->usb_string.id; in uvc_func_allow_link()
3338 mutex_unlock(&opts->lock); in uvc_func_allow_link()
3349 struct f_uvc_opts *opts; in uvc_func_drop_link() local
3351 opts = to_f_uvc_opts(src); in uvc_func_drop_link()
3352 mutex_lock(&opts->lock); in uvc_func_drop_link()
3355 opts->iad_index = 0; in uvc_func_drop_link()
3357 opts->vs0_index = 0; in uvc_func_drop_link()
3359 opts->vs1_index = 0; in uvc_func_drop_link()
3361 mutex_unlock(&opts->lock); in uvc_func_drop_link()
3374 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
3377 mutex_lock(&opts->lock); \
3378 result = sprintf(page, "%u\n", opts->cname); \
3379 mutex_unlock(&opts->lock); \
3388 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
3392 mutex_lock(&opts->lock); \
3393 if (opts->refcnt) { \
3406 opts->cname = num; \
3409 mutex_unlock(&opts->lock); \
3425 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
3428 mutex_lock(&opts->lock); \
3429 result = scnprintf(page, sizeof(opts->aname), "%s", opts->aname);\
3430 mutex_unlock(&opts->lock); \
3438 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
3439 int size = min(sizeof(opts->aname), len + 1); \
3442 mutex_lock(&opts->lock); \
3443 if (opts->refcnt) { \
3448 ret = strscpy(opts->aname, page, size); \
3453 mutex_unlock(&opts->lock); \
3485 int uvcg_attach_configfs(struct f_uvc_opts *opts) in uvcg_attach_configfs() argument
3489 config_group_init_type_name(&opts->func_inst.group, uvc_func_type.name, in uvcg_attach_configfs()
3492 ret = uvcg_config_create_children(&opts->func_inst.group, in uvcg_attach_configfs()
3495 config_group_put(&opts->func_inst.group); in uvcg_attach_configfs()