diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-09-08 10:18:16 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-09-08 15:49:37 +0200 |
commit | efb540c895d2cb77b1472edda6ca45d40719a041 (patch) | |
tree | 554142752ddc10422994afd045b9680c260d3a2f /drivers/usb/gadget/legacy/webcam.c | |
parent | usb: gadget: f_uvc: Move to video_ioctl2 (diff) | |
download | linux-efb540c895d2cb77b1472edda6ca45d40719a041.tar.xz linux-efb540c895d2cb77b1472edda6ca45d40719a041.zip |
usb: gadget: uvc: move module parameters from f_uvc
When configfs support is integrated the future uvc function
module must not take any parameters. Move parameters to
webcam.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/legacy/webcam.c')
-rw-r--r-- | drivers/usb/gadget/legacy/webcam.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c index a11d8e420bfe..f826622d1dc2 100644 --- a/drivers/usb/gadget/legacy/webcam.c +++ b/drivers/usb/gadget/legacy/webcam.c @@ -29,6 +29,25 @@ #include "f_uvc.c" USB_GADGET_COMPOSITE_OPTIONS(); + +/*-------------------------------------------------------------------------*/ + +/* module parameters specific to the Video streaming endpoint */ +static unsigned int streaming_interval = 1; +module_param(streaming_interval, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(streaming_interval, "1 - 16"); + +static unsigned int streaming_maxpacket = 1024; +module_param(streaming_maxpacket, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(streaming_maxpacket, "1 - 1023 (FS), 1 - 3072 (hs/ss)"); + +static unsigned int streaming_maxburst; +module_param(streaming_maxburst, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(streaming_maxburst, "0 - 15 (ss only)"); + +static unsigned int trace; +module_param(trace, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(trace, "Trace level bitmask"); /* -------------------------------------------------------------------------- * Device descriptor */ @@ -326,9 +345,11 @@ static const struct uvc_descriptor_header * const uvc_ss_streaming_cls[] = { static int __init webcam_config_bind(struct usb_configuration *c) { - return uvc_bind_config(c, uvc_fs_control_cls, uvc_ss_control_cls, - uvc_fs_streaming_cls, uvc_hs_streaming_cls, - uvc_ss_streaming_cls); + return uvc_bind_config(c, uvc_fs_control_cls, + uvc_ss_control_cls, uvc_fs_streaming_cls, + uvc_hs_streaming_cls, uvc_ss_streaming_cls, + streaming_interval, streaming_maxpacket, + streaming_maxburst, trace); } static struct usb_configuration webcam_config_driver = { |