Lines Matching refs:opts
124 struct f_uvc_opts *opts; \
132 opts = to_f_uvc_opts(opts_item); \
134 mutex_lock(&opts->lock); \
136 mutex_unlock(&opts->lock); \
147 struct f_uvc_opts *opts; \
156 opts = to_f_uvc_opts(opts_item); \
158 mutex_lock(&opts->lock); \
159 if (ch->linked || opts->refcnt) { \
175 mutex_unlock(&opts->lock); \
242 struct f_uvc_opts *opts; \
251 opts = to_f_uvc_opts(opts_item); \
252 pd = &opts->uvc_processing; \
254 mutex_lock(&opts->lock); \
256 mutex_unlock(&opts->lock); \
275 struct f_uvc_opts *opts; in uvcg_default_processing_bm_controls_show() local
285 opts = to_f_uvc_opts(opts_item); in uvcg_default_processing_bm_controls_show()
286 pd = &opts->uvc_processing; in uvcg_default_processing_bm_controls_show()
288 mutex_lock(&opts->lock); in uvcg_default_processing_bm_controls_show()
293 mutex_unlock(&opts->lock); in uvcg_default_processing_bm_controls_show()
345 struct f_uvc_opts *opts; \
355 opts = to_f_uvc_opts(opts_item); \
356 cd = &opts->uvc_camera_terminal; \
358 mutex_lock(&opts->lock); \
360 mutex_unlock(&opts->lock); \
386 struct f_uvc_opts *opts; in uvcg_default_camera_bm_controls_show() local
397 opts = to_f_uvc_opts(opts_item); in uvcg_default_camera_bm_controls_show()
398 cd = &opts->uvc_camera_terminal; in uvcg_default_camera_bm_controls_show()
400 mutex_lock(&opts->lock); in uvcg_default_camera_bm_controls_show()
405 mutex_unlock(&opts->lock); in uvcg_default_camera_bm_controls_show()
459 struct f_uvc_opts *opts; \
469 opts = to_f_uvc_opts(opts_item); \
470 cd = &opts->uvc_output_terminal; \
472 mutex_lock(&opts->lock); \
474 mutex_unlock(&opts->lock); \
571 struct f_uvc_opts *opts; in uvcg_control_class_allow_link() local
584 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_allow_link()
586 mutex_lock(&opts->lock); in uvcg_control_class_allow_link()
588 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_allow_link()
591 if (opts->refcnt || class_array[0]) { in uvcg_control_class_allow_link()
602 mutex_unlock(&opts->lock); in uvcg_control_class_allow_link()
613 struct f_uvc_opts *opts; in uvcg_control_class_drop_link() local
625 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_drop_link()
627 mutex_lock(&opts->lock); in uvcg_control_class_drop_link()
629 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_drop_link()
630 if (!class_array || opts->refcnt) in uvcg_control_class_drop_link()
638 mutex_unlock(&opts->lock); in uvcg_control_class_drop_link()
700 struct f_uvc_opts *opts; in uvcg_default_control_b_interface_number_show() local
706 opts = to_f_uvc_opts(opts_item); in uvcg_default_control_b_interface_number_show()
708 mutex_lock(&opts->lock); in uvcg_default_control_b_interface_number_show()
709 result += sprintf(page, "%u\n", opts->control_interface); in uvcg_default_control_b_interface_number_show()
710 mutex_unlock(&opts->lock); in uvcg_default_control_b_interface_number_show()
752 struct f_uvc_opts *opts; in uvcg_format_bma_controls_show() local
761 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_show()
763 mutex_lock(&opts->lock); in uvcg_format_bma_controls_show()
770 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_show()
779 struct f_uvc_opts *opts; in uvcg_format_bma_controls_store() local
787 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_store()
789 mutex_lock(&opts->lock); in uvcg_format_bma_controls_store()
790 if (ch->linked || opts->refcnt) { in uvcg_format_bma_controls_store()
803 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_store()
820 struct f_uvc_opts *opts; in uvcg_streaming_header_allow_link() local
830 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_allow_link()
832 mutex_lock(&opts->lock); in uvcg_streaming_header_allow_link()
874 mutex_unlock(&opts->lock); in uvcg_streaming_header_allow_link()
884 struct f_uvc_opts *opts; in uvcg_streaming_header_drop_link() local
893 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_drop_link()
895 mutex_lock(&opts->lock); in uvcg_streaming_header_drop_link()
909 mutex_unlock(&opts->lock); in uvcg_streaming_header_drop_link()
924 struct f_uvc_opts *opts; \
932 opts = to_f_uvc_opts(opts_item); \
934 mutex_lock(&opts->lock); \
936 mutex_unlock(&opts->lock); \
1008 struct f_uvc_opts *opts; \
1016 opts = to_f_uvc_opts(opts_item); \
1018 mutex_lock(&opts->lock); \
1020 mutex_unlock(&opts->lock); \
1030 struct f_uvc_opts *opts; \
1044 opts = to_f_uvc_opts(opts_item); \
1047 mutex_lock(&opts->lock); \
1048 if (fmt->linked || opts->refcnt) { \
1056 mutex_unlock(&opts->lock); \
1068 struct f_uvc_opts *opts; in uvcg_frame_b_frame_index_show() local
1085 opts = to_f_uvc_opts(opts_item); in uvcg_frame_b_frame_index_show()
1087 mutex_lock(&opts->lock); in uvcg_frame_b_frame_index_show()
1089 mutex_unlock(&opts->lock); in uvcg_frame_b_frame_index_show()
1112 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_show() local
1121 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_show()
1123 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
1128 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
1189 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_store() local
1199 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_store()
1202 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
1203 if (fmt->linked || opts->refcnt) { in uvcg_frame_dw_frame_interval_store()
1232 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
1263 struct f_uvc_opts *opts; in uvcg_frame_make() local
1281 opts = to_f_uvc_opts(opts_item); in uvcg_frame_make()
1283 mutex_lock(&opts->lock); in uvcg_frame_make()
1292 mutex_unlock(&opts->lock); in uvcg_frame_make()
1299 mutex_unlock(&opts->lock); in uvcg_frame_make()
1307 mutex_unlock(&opts->lock); in uvcg_frame_make()
1317 struct f_uvc_opts *opts; in uvcg_frame_drop() local
1323 opts = to_f_uvc_opts(opts_item); in uvcg_frame_drop()
1325 mutex_lock(&opts->lock); in uvcg_frame_drop()
1336 mutex_unlock(&opts->lock); in uvcg_frame_drop()
1370 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_show() local
1377 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_show()
1379 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_show()
1381 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_show()
1392 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_store() local
1400 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_store()
1402 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_store()
1403 if (ch->fmt.linked || opts->refcnt) { in uvcg_uncompressed_guid_format_store()
1413 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_store()
1425 struct f_uvc_opts *opts; \
1433 opts = to_f_uvc_opts(opts_item); \
1435 mutex_lock(&opts->lock); \
1437 mutex_unlock(&opts->lock); \
1450 struct f_uvc_opts *opts; \
1458 opts = to_f_uvc_opts(opts_item); \
1460 mutex_lock(&opts->lock); \
1462 mutex_unlock(&opts->lock); \
1473 struct f_uvc_opts *opts; \
1482 opts = to_f_uvc_opts(opts_item); \
1484 mutex_lock(&opts->lock); \
1485 if (u->fmt.linked || opts->refcnt) { \
1503 mutex_unlock(&opts->lock); \
1614 struct f_uvc_opts *opts; \
1622 opts = to_f_uvc_opts(opts_item); \
1624 mutex_lock(&opts->lock); \
1626 mutex_unlock(&opts->lock); \
1638 struct f_uvc_opts *opts; \
1646 opts = to_f_uvc_opts(opts_item); \
1648 mutex_lock(&opts->lock); \
1650 mutex_unlock(&opts->lock); \
1661 struct f_uvc_opts *opts; \
1670 opts = to_f_uvc_opts(opts_item); \
1672 mutex_lock(&opts->lock); \
1673 if (u->fmt.linked || opts->refcnt) { \
1691 mutex_unlock(&opts->lock); \
1791 struct f_uvc_opts *opts; \
1800 opts = to_f_uvc_opts(opts_item); \
1801 cd = &opts->uvc_color_matching; \
1803 mutex_lock(&opts->lock); \
1805 mutex_unlock(&opts->lock); \
2082 struct f_uvc_opts *opts; in uvcg_streaming_class_allow_link() local
2097 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_allow_link()
2099 mutex_lock(&opts->lock); in uvcg_streaming_class_allow_link()
2101 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_allow_link()
2102 if (!class_array || *class_array || opts->refcnt) { in uvcg_streaming_class_allow_link()
2139 *cl_arr = (struct uvc_descriptor_header *)&opts->uvc_color_matching; in uvcg_streaming_class_allow_link()
2145 mutex_unlock(&opts->lock); in uvcg_streaming_class_allow_link()
2156 struct f_uvc_opts *opts; in uvcg_streaming_class_drop_link() local
2168 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_drop_link()
2170 mutex_lock(&opts->lock); in uvcg_streaming_class_drop_link()
2172 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_drop_link()
2176 if (opts->refcnt) in uvcg_streaming_class_drop_link()
2186 mutex_unlock(&opts->lock); in uvcg_streaming_class_drop_link()
2248 struct f_uvc_opts *opts; in uvcg_default_streaming_b_interface_number_show() local
2254 opts = to_f_uvc_opts(opts_item); in uvcg_default_streaming_b_interface_number_show()
2256 mutex_lock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
2257 result += sprintf(page, "%u\n", opts->streaming_interface); in uvcg_default_streaming_b_interface_number_show()
2258 mutex_unlock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
2295 struct f_uvc_opts *opts = to_f_uvc_opts(item); in uvc_func_item_release() local
2298 usb_put_function_instance(&opts->func_inst); in uvc_func_item_release()
2309 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2312 mutex_lock(&opts->lock); \
2313 result = sprintf(page, "%u\n", opts->cname); \
2314 mutex_unlock(&opts->lock); \
2323 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2327 mutex_lock(&opts->lock); \
2328 if (opts->refcnt) { \
2341 opts->cname = num; \
2344 mutex_unlock(&opts->lock); \
2360 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2363 mutex_lock(&opts->lock); \
2364 result = snprintf(page, sizeof(opts->aname), "%s", opts->aname);\
2365 mutex_unlock(&opts->lock); \
2373 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2374 int size = min(sizeof(opts->aname), len + 1); \
2377 mutex_lock(&opts->lock); \
2378 if (opts->refcnt) { \
2383 ret = strscpy(opts->aname, page, size); \
2388 mutex_unlock(&opts->lock); \
2420 int uvcg_attach_configfs(struct f_uvc_opts *opts) in uvcg_attach_configfs() argument
2424 config_group_init_type_name(&opts->func_inst.group, uvc_func_type.name, in uvcg_attach_configfs()
2427 ret = uvcg_config_create_children(&opts->func_inst.group, in uvcg_attach_configfs()
2430 config_group_put(&opts->func_inst.group); in uvcg_attach_configfs()