uvc               207 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = req->context;
uvc               211 drivers/usb/gadget/function/f_uvc.c 	if (uvc->event_setup_out) {
uvc               212 drivers/usb/gadget/function/f_uvc.c 		uvc->event_setup_out = 0;
uvc               218 drivers/usb/gadget/function/f_uvc.c 		v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               225 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               241 drivers/usb/gadget/function/f_uvc.c 	uvc->event_setup_out = !(ctrl->bRequestType & USB_DIR_IN);
uvc               242 drivers/usb/gadget/function/f_uvc.c 	uvc->event_length = le16_to_cpu(ctrl->wLength);
uvc               247 drivers/usb/gadget/function/f_uvc.c 	v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               252 drivers/usb/gadget/function/f_uvc.c void uvc_function_setup_continue(struct uvc_device *uvc)
uvc               254 drivers/usb/gadget/function/f_uvc.c 	struct usb_composite_dev *cdev = uvc->func.config->cdev;
uvc               262 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               266 drivers/usb/gadget/function/f_uvc.c 	if (interface == uvc->control_intf)
uvc               268 drivers/usb/gadget/function/f_uvc.c 	else if (interface != uvc->streaming_intf)
uvc               271 drivers/usb/gadget/function/f_uvc.c 		return uvc->video.ep->enabled ? 1 : 0;
uvc               277 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               285 drivers/usb/gadget/function/f_uvc.c 	if (interface == uvc->control_intf) {
uvc               290 drivers/usb/gadget/function/f_uvc.c 		usb_ep_disable(uvc->control_ep);
uvc               292 drivers/usb/gadget/function/f_uvc.c 		if (!uvc->control_ep->desc)
uvc               293 drivers/usb/gadget/function/f_uvc.c 			if (config_ep_by_speed(cdev->gadget, f, uvc->control_ep))
uvc               296 drivers/usb/gadget/function/f_uvc.c 		usb_ep_enable(uvc->control_ep);
uvc               298 drivers/usb/gadget/function/f_uvc.c 		if (uvc->state == UVC_STATE_DISCONNECTED) {
uvc               302 drivers/usb/gadget/function/f_uvc.c 			v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               304 drivers/usb/gadget/function/f_uvc.c 			uvc->state = UVC_STATE_CONNECTED;
uvc               310 drivers/usb/gadget/function/f_uvc.c 	if (interface != uvc->streaming_intf)
uvc               320 drivers/usb/gadget/function/f_uvc.c 		if (uvc->state != UVC_STATE_STREAMING)
uvc               323 drivers/usb/gadget/function/f_uvc.c 		if (uvc->video.ep)
uvc               324 drivers/usb/gadget/function/f_uvc.c 			usb_ep_disable(uvc->video.ep);
uvc               328 drivers/usb/gadget/function/f_uvc.c 		v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               330 drivers/usb/gadget/function/f_uvc.c 		uvc->state = UVC_STATE_CONNECTED;
uvc               334 drivers/usb/gadget/function/f_uvc.c 		if (uvc->state != UVC_STATE_CONNECTED)
uvc               337 drivers/usb/gadget/function/f_uvc.c 		if (!uvc->video.ep)
uvc               341 drivers/usb/gadget/function/f_uvc.c 		usb_ep_disable(uvc->video.ep);
uvc               344 drivers/usb/gadget/function/f_uvc.c 				&(uvc->func), uvc->video.ep);
uvc               347 drivers/usb/gadget/function/f_uvc.c 		usb_ep_enable(uvc->video.ep);
uvc               351 drivers/usb/gadget/function/f_uvc.c 		v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               362 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               369 drivers/usb/gadget/function/f_uvc.c 	v4l2_event_queue(&uvc->vdev, &v4l2_event);
uvc               371 drivers/usb/gadget/function/f_uvc.c 	uvc->state = UVC_STATE_DISCONNECTED;
uvc               373 drivers/usb/gadget/function/f_uvc.c 	usb_ep_disable(uvc->video.ep);
uvc               374 drivers/usb/gadget/function/f_uvc.c 	usb_ep_disable(uvc->control_ep);
uvc               382 drivers/usb/gadget/function/f_uvc.c uvc_function_connect(struct uvc_device *uvc)
uvc               386 drivers/usb/gadget/function/f_uvc.c 	if ((ret = usb_function_activate(&uvc->func)) < 0)
uvc               387 drivers/usb/gadget/function/f_uvc.c 		uvcg_info(&uvc->func, "UVC connect failed with %d\n", ret);
uvc               391 drivers/usb/gadget/function/f_uvc.c uvc_function_disconnect(struct uvc_device *uvc)
uvc               395 drivers/usb/gadget/function/f_uvc.c 	if ((ret = usb_function_deactivate(&uvc->func)) < 0)
uvc               396 drivers/usb/gadget/function/f_uvc.c 		uvcg_info(&uvc->func, "UVC disconnect failed with %d\n", ret);
uvc               406 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = dev_get_drvdata(dev);
uvc               408 drivers/usb/gadget/function/f_uvc.c 	return sprintf(buf, "%s\n", uvc->func.fi->group.cg_item.ci_name);
uvc               414 drivers/usb/gadget/function/f_uvc.c uvc_register_video(struct uvc_device *uvc)
uvc               416 drivers/usb/gadget/function/f_uvc.c 	struct usb_composite_dev *cdev = uvc->func.config->cdev;
uvc               420 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.v4l2_dev = &uvc->v4l2_dev;
uvc               421 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.fops = &uvc_v4l2_fops;
uvc               422 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.ioctl_ops = &uvc_v4l2_ioctl_ops;
uvc               423 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.release = video_device_release_empty;
uvc               424 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.vfl_dir = VFL_DIR_TX;
uvc               425 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.lock = &uvc->video.mutex;
uvc               426 drivers/usb/gadget/function/f_uvc.c 	uvc->vdev.device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
uvc               427 drivers/usb/gadget/function/f_uvc.c 	strlcpy(uvc->vdev.name, cdev->gadget->name, sizeof(uvc->vdev.name));
uvc               429 drivers/usb/gadget/function/f_uvc.c 	video_set_drvdata(&uvc->vdev, uvc);
uvc               431 drivers/usb/gadget/function/f_uvc.c 	ret = video_register_device(&uvc->vdev, VFL_TYPE_GRABBER, -1);
uvc               435 drivers/usb/gadget/function/f_uvc.c 	ret = device_create_file(&uvc->vdev.dev, &dev_attr_function_name);
uvc               437 drivers/usb/gadget/function/f_uvc.c 		video_unregister_device(&uvc->vdev);
uvc               462 drivers/usb/gadget/function/f_uvc.c uvc_copy_descriptors(struct uvc_device *uvc, enum usb_device_speed speed)
uvc               480 drivers/usb/gadget/function/f_uvc.c 		uvc_control_desc = uvc->desc.ss_control;
uvc               481 drivers/usb/gadget/function/f_uvc.c 		uvc_streaming_cls = uvc->desc.ss_streaming;
uvc               486 drivers/usb/gadget/function/f_uvc.c 		uvc_control_desc = uvc->desc.fs_control;
uvc               487 drivers/usb/gadget/function/f_uvc.c 		uvc_streaming_cls = uvc->desc.hs_streaming;
uvc               493 drivers/usb/gadget/function/f_uvc.c 		uvc_control_desc = uvc->desc.fs_control;
uvc               494 drivers/usb/gadget/function/f_uvc.c 		uvc_streaming_cls = uvc->desc.fs_streaming;
uvc               563 drivers/usb/gadget/function/f_uvc.c 	uvc_control_header->baInterfaceNr[0] = uvc->streaming_intf;
uvc               576 drivers/usb/gadget/function/f_uvc.c 	uvc_streaming_header->bEndpointAddress = uvc->video.ep->address;
uvc               588 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               652 drivers/usb/gadget/function/f_uvc.c 	uvc->control_ep = ep;
uvc               666 drivers/usb/gadget/function/f_uvc.c 	uvc->video.ep = ep;
uvc               668 drivers/usb/gadget/function/f_uvc.c 	uvc_fs_streaming_ep.bEndpointAddress = uvc->video.ep->address;
uvc               669 drivers/usb/gadget/function/f_uvc.c 	uvc_hs_streaming_ep.bEndpointAddress = uvc->video.ep->address;
uvc               670 drivers/usb/gadget/function/f_uvc.c 	uvc_ss_streaming_ep.bEndpointAddress = uvc->video.ep->address;
uvc               689 drivers/usb/gadget/function/f_uvc.c 	uvc->control_intf = ret;
uvc               696 drivers/usb/gadget/function/f_uvc.c 	uvc->streaming_intf = ret;
uvc               700 drivers/usb/gadget/function/f_uvc.c 	f->fs_descriptors = uvc_copy_descriptors(uvc, USB_SPEED_FULL);
uvc               707 drivers/usb/gadget/function/f_uvc.c 		f->hs_descriptors = uvc_copy_descriptors(uvc, USB_SPEED_HIGH);
uvc               715 drivers/usb/gadget/function/f_uvc.c 		f->ss_descriptors = uvc_copy_descriptors(uvc, USB_SPEED_SUPER);
uvc               724 drivers/usb/gadget/function/f_uvc.c 	uvc->control_req = usb_ep_alloc_request(cdev->gadget->ep0, GFP_KERNEL);
uvc               725 drivers/usb/gadget/function/f_uvc.c 	uvc->control_buf = kmalloc(UVC_MAX_REQUEST_SIZE, GFP_KERNEL);
uvc               726 drivers/usb/gadget/function/f_uvc.c 	if (uvc->control_req == NULL || uvc->control_buf == NULL) {
uvc               731 drivers/usb/gadget/function/f_uvc.c 	uvc->control_req->buf = uvc->control_buf;
uvc               732 drivers/usb/gadget/function/f_uvc.c 	uvc->control_req->complete = uvc_function_ep0_complete;
uvc               733 drivers/usb/gadget/function/f_uvc.c 	uvc->control_req->context = uvc;
uvc               735 drivers/usb/gadget/function/f_uvc.c 	if (v4l2_device_register(&cdev->gadget->dev, &uvc->v4l2_dev)) {
uvc               741 drivers/usb/gadget/function/f_uvc.c 	ret = uvcg_video_init(&uvc->video, uvc);
uvc               746 drivers/usb/gadget/function/f_uvc.c 	ret = uvc_register_video(uvc);
uvc               755 drivers/usb/gadget/function/f_uvc.c 	v4l2_device_unregister(&uvc->v4l2_dev);
uvc               757 drivers/usb/gadget/function/f_uvc.c 	if (uvc->control_req)
uvc               758 drivers/usb/gadget/function/f_uvc.c 		usb_ep_free_request(cdev->gadget->ep0, uvc->control_req);
uvc               759 drivers/usb/gadget/function/f_uvc.c 	kfree(uvc->control_buf);
uvc               873 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               877 drivers/usb/gadget/function/f_uvc.c 	kfree(uvc);
uvc               883 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc = to_uvc(f);
uvc               887 drivers/usb/gadget/function/f_uvc.c 	device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
uvc               888 drivers/usb/gadget/function/f_uvc.c 	video_unregister_device(&uvc->vdev);
uvc               889 drivers/usb/gadget/function/f_uvc.c 	v4l2_device_unregister(&uvc->v4l2_dev);
uvc               891 drivers/usb/gadget/function/f_uvc.c 	usb_ep_free_request(cdev->gadget->ep0, uvc->control_req);
uvc               892 drivers/usb/gadget/function/f_uvc.c 	kfree(uvc->control_buf);
uvc               899 drivers/usb/gadget/function/f_uvc.c 	struct uvc_device *uvc;
uvc               903 drivers/usb/gadget/function/f_uvc.c 	uvc = kzalloc(sizeof(*uvc), GFP_KERNEL);
uvc               904 drivers/usb/gadget/function/f_uvc.c 	if (uvc == NULL)
uvc               907 drivers/usb/gadget/function/f_uvc.c 	mutex_init(&uvc->video.mutex);
uvc               908 drivers/usb/gadget/function/f_uvc.c 	uvc->state = UVC_STATE_DISCONNECTED;
uvc               928 drivers/usb/gadget/function/f_uvc.c 	uvc->desc.fs_control = opts->fs_control;
uvc               929 drivers/usb/gadget/function/f_uvc.c 	uvc->desc.ss_control = opts->ss_control;
uvc               930 drivers/usb/gadget/function/f_uvc.c 	uvc->desc.fs_streaming = opts->fs_streaming;
uvc               931 drivers/usb/gadget/function/f_uvc.c 	uvc->desc.hs_streaming = opts->hs_streaming;
uvc               932 drivers/usb/gadget/function/f_uvc.c 	uvc->desc.ss_streaming = opts->ss_streaming;
uvc               937 drivers/usb/gadget/function/f_uvc.c 	uvc->func.name = "uvc";
uvc               938 drivers/usb/gadget/function/f_uvc.c 	uvc->func.bind = uvc_function_bind;
uvc               939 drivers/usb/gadget/function/f_uvc.c 	uvc->func.unbind = uvc_unbind;
uvc               940 drivers/usb/gadget/function/f_uvc.c 	uvc->func.get_alt = uvc_function_get_alt;
uvc               941 drivers/usb/gadget/function/f_uvc.c 	uvc->func.set_alt = uvc_function_set_alt;
uvc               942 drivers/usb/gadget/function/f_uvc.c 	uvc->func.disable = uvc_function_disable;
uvc               943 drivers/usb/gadget/function/f_uvc.c 	uvc->func.setup = uvc_function_setup;
uvc               944 drivers/usb/gadget/function/f_uvc.c 	uvc->func.free_func = uvc_free;
uvc               945 drivers/usb/gadget/function/f_uvc.c 	uvc->func.bind_deactivated = true;
uvc               947 drivers/usb/gadget/function/f_uvc.c 	return &uvc->func;
uvc               950 drivers/usb/gadget/function/f_uvc.c DECLARE_USB_FUNCTION_INIT(uvc, uvc_alloc_inst, uvc_alloc);
uvc                14 drivers/usb/gadget/function/f_uvc.h void uvc_function_setup_continue(struct uvc_device *uvc);
uvc                16 drivers/usb/gadget/function/f_uvc.h void uvc_function_connect(struct uvc_device *uvc);
uvc                18 drivers/usb/gadget/function/f_uvc.h void uvc_function_disconnect(struct uvc_device *uvc);
uvc                77 drivers/usb/gadget/function/uvc.h 	struct uvc_device *uvc;
uvc               157 drivers/usb/gadget/function/uvc.h extern void uvc_function_setup_continue(struct uvc_device *uvc);
uvc               160 drivers/usb/gadget/function/uvc.h extern void uvc_function_connect(struct uvc_device *uvc);
uvc               161 drivers/usb/gadget/function/uvc.h extern void uvc_function_disconnect(struct uvc_device *uvc);
uvc                33 drivers/usb/gadget/function/uvc_v4l2.c uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data)
uvc                35 drivers/usb/gadget/function/uvc_v4l2.c 	struct usb_composite_dev *cdev = uvc->func.config->cdev;
uvc                36 drivers/usb/gadget/function/uvc_v4l2.c 	struct usb_request *req = uvc->control_req;
uvc                41 drivers/usb/gadget/function/uvc_v4l2.c 	req->length = min_t(unsigned int, uvc->event_length, data->length);
uvc                42 drivers/usb/gadget/function/uvc_v4l2.c 	req->zero = data->length < uvc->event_length;
uvc                67 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc                68 drivers/usb/gadget/function/uvc_v4l2.c 	struct usb_composite_dev *cdev = uvc->func.config->cdev;
uvc                81 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc                82 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               100 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               101 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               114 drivers/usb/gadget/function/uvc_v4l2.c 		uvcg_info(&uvc->func, "Unsupported format 0x%08x.\n",
uvc               141 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               142 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               154 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               155 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               164 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               165 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               179 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               180 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               189 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               190 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               205 drivers/usb/gadget/function/uvc_v4l2.c 	uvc_function_setup_continue(uvc);
uvc               206 drivers/usb/gadget/function/uvc_v4l2.c 	uvc->state = UVC_STATE_STREAMING;
uvc               215 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               216 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_video *video = &uvc->video;
uvc               246 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               250 drivers/usb/gadget/function/uvc_v4l2.c 		return uvc_send_response(uvc, arg);
uvc               280 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               290 drivers/usb/gadget/function/uvc_v4l2.c 	handle->device = &uvc->video;
uvc               293 drivers/usb/gadget/function/uvc_v4l2.c 	uvc_function_connect(uvc);
uvc               301 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               305 drivers/usb/gadget/function/uvc_v4l2.c 	uvc_function_disconnect(uvc);
uvc               324 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               326 drivers/usb/gadget/function/uvc_v4l2.c 	return uvcg_queue_mmap(&uvc->video.queue, vma);
uvc               333 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               335 drivers/usb/gadget/function/uvc_v4l2.c 	return uvcg_queue_poll(&uvc->video.queue, file, wait);
uvc               344 drivers/usb/gadget/function/uvc_v4l2.c 	struct uvc_device *uvc = video_get_drvdata(vdev);
uvc               346 drivers/usb/gadget/function/uvc_v4l2.c 	return uvcg_queue_get_unmapped_area(&uvc->video.queue, pgoff);
uvc               134 drivers/usb/gadget/function/uvc_video.c 		uvcg_err(&video->uvc->func, "Failed to queue request (%d).\n",
uvc               189 drivers/usb/gadget/function/uvc_video.c 		uvcg_dbg(&video->uvc->func, "VS request cancelled.\n");
uvc               194 drivers/usb/gadget/function/uvc_video.c 		uvcg_info(&video->uvc->func,
uvc               360 drivers/usb/gadget/function/uvc_video.c 		uvcg_info(&video->uvc->func,
uvc               393 drivers/usb/gadget/function/uvc_video.c int uvcg_video_init(struct uvc_video *video, struct uvc_device *uvc)
uvc               398 drivers/usb/gadget/function/uvc_video.c 	video->uvc = uvc;
uvc                21 drivers/usb/gadget/function/uvc_video.h int uvcg_video_init(struct uvc_video *video, struct uvc_device *uvc);