13 #include <linux/kernel.h>
14 #include <linux/device.h>
36 #define WEBCAM_VENDOR_ID 0x1d6b
37 #define WEBCAM_PRODUCT_ID 0x0102
38 #define WEBCAM_DEVICE_BCD 0x0010
40 static char webcam_vendor_label[] =
"Linux Foundation";
41 static char webcam_product_label[] =
"Webcam gadget";
42 static char webcam_config_label[] =
"Video";
46 #define STRING_DESCRIPTION_IDX USB_GADGET_FIRST_AVAIL_IDX
58 .strings = webcam_strings,
71 .bDeviceSubClass = 0x02,
72 .bDeviceProtocol = 0x01,
80 .bNumConfigurations = 0,
93 .baInterfaceNr[0] = 0,
145 .bEndpointAddress = 0,
148 .bStillCaptureMethod = 0,
149 .bTriggerSupport = 0,
152 .bmaControls[0][0] = 0,
153 .bmaControls[1][0] = 4,
161 .bNumFrameDescriptors = 2,
163 {
'Y',
'U',
'Y',
'2', 0x00, 0x00, 0x10, 0x00,
164 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71},
166 .bDefaultFrameIndex = 1,
169 .bmInterfaceFlags = 0,
188 .bFrameIntervalType = 3,
206 .bFrameIntervalType = 1,
215 .bNumFrameDescriptors = 2,
217 .bDefaultFrameIndex = 1,
220 .bmInterfaceFlags = 0,
239 .bFrameIntervalType = 3,
257 .bFrameIntervalType = 1,
265 .bColorPrimaries = 1,
266 .bTransferCharacteristics = 1,
267 .bMatrixCoefficients = 4,
330 uvc_fs_streaming_cls, uvc_hs_streaming_cls,
331 uvc_ss_streaming_cls);
335 .label = webcam_config_label,
336 .bConfigurationValue = 1,
339 .bMaxPower = CONFIG_USB_GADGET_VBUS_DRAW / 2,
368 webcam_config_bind)) < 0)
372 INFO(cdev,
"Webcam Video Gadget\n");
386 .dev = &webcam_device_descriptor,
387 .strings = webcam_device_strings,
390 .unbind = webcam_unbind,