diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-09-09 03:02:10 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-09-09 18:49:16 +0400 |
commit | 6d11ed76c45dd7c8322c2d03575f2164cc725c18 (patch) | |
tree | 8d01c8280f47d8838b4e22f6877c563b877aa078 /drivers/usb/gadget/function/u_uvc.h | |
parent | 3a83c16ef0e03e2ca2f1ce547a7cba53a62d0e0d (diff) | |
download | linux-6d11ed76c45dd7c8322c2d03575f2164cc725c18.tar.xz |
usb: gadget: f_uvc: convert f_uvc to new function interface
Use the new function registration interface. It is required
in order to integrate configfs support.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[Updated copyright years]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_uvc.h')
-rw-r--r-- | drivers/usb/gadget/function/u_uvc.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uvc.h b/drivers/usb/gadget/function/u_uvc.h new file mode 100644 index 000000000000..2a8dfdff0332 --- /dev/null +++ b/drivers/usb/gadget/function/u_uvc.h @@ -0,0 +1,39 @@ +/* + * u_uvc.h + * + * Utility definitions for the uvc function + * + * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef U_UVC_H +#define U_UVC_H + +#include <linux/usb/composite.h> + +#define to_f_uvc_opts(f) container_of(f, struct f_uvc_opts, func_inst) + +struct f_uvc_opts { + struct usb_function_instance func_inst; + unsigned int uvc_gadget_trace_param; + unsigned int streaming_interval; + unsigned int streaming_maxpacket; + unsigned int streaming_maxburst; + const struct uvc_descriptor_header * const *fs_control; + const struct uvc_descriptor_header * const *ss_control; + const struct uvc_descriptor_header * const *fs_streaming; + const struct uvc_descriptor_header * const *hs_streaming; + const struct uvc_descriptor_header * const *ss_streaming; +}; + +void uvc_set_trace_param(unsigned int trace); + +#endif /* U_UVC_H */ + |