aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/webcam.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-10 14:03:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:15 -0400
commitbbafc0cb6c52c40647f561854db5fbac4d608186 (patch)
treed10c23e4e0a7ae5e169f7b7c627c6a762b0a2d56 /drivers/usb/gadget/webcam.c
parentc89f66f629f0e94806e3ec6f8f77b61a8feed39f (diff)
V4L/DVB: uvc: Move constants and structures definitions to linux/usb/video.h
The UVC host and gadget drivers both define constants and structures in private header files. Move all those definitions to linux/usb/video.h where they can be shared by the two drivers (and be available for userspace applications). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/usb/gadget/webcam.c')
-rw-r--r--drivers/usb/gadget/webcam.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c
index f5f3030cc416..288d21155abe 100644
--- a/drivers/usb/gadget/webcam.c
+++ b/drivers/usb/gadget/webcam.c
@@ -90,7 +90,7 @@ DECLARE_UVC_HEADER_DESCRIPTOR(1);
90static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = { 90static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
91 .bLength = UVC_DT_HEADER_SIZE(1), 91 .bLength = UVC_DT_HEADER_SIZE(1),
92 .bDescriptorType = USB_DT_CS_INTERFACE, 92 .bDescriptorType = USB_DT_CS_INTERFACE,
93 .bDescriptorSubType = UVC_DT_HEADER, 93 .bDescriptorSubType = UVC_VC_HEADER,
94 .bcdUVC = cpu_to_le16(0x0100), 94 .bcdUVC = cpu_to_le16(0x0100),
95 .wTotalLength = 0, /* dynamic */ 95 .wTotalLength = 0, /* dynamic */
96 .dwClockFrequency = cpu_to_le32(48000000), 96 .dwClockFrequency = cpu_to_le32(48000000),
@@ -101,7 +101,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
101static const struct uvc_camera_terminal_descriptor uvc_camera_terminal = { 101static const struct uvc_camera_terminal_descriptor uvc_camera_terminal = {
102 .bLength = UVC_DT_CAMERA_TERMINAL_SIZE(3), 102 .bLength = UVC_DT_CAMERA_TERMINAL_SIZE(3),
103 .bDescriptorType = USB_DT_CS_INTERFACE, 103 .bDescriptorType = USB_DT_CS_INTERFACE,
104 .bDescriptorSubType = UVC_DT_INPUT_TERMINAL, 104 .bDescriptorSubType = UVC_VC_INPUT_TERMINAL,
105 .bTerminalID = 1, 105 .bTerminalID = 1,
106 .wTerminalType = cpu_to_le16(0x0201), 106 .wTerminalType = cpu_to_le16(0x0201),
107 .bAssocTerminal = 0, 107 .bAssocTerminal = 0,
@@ -118,7 +118,7 @@ static const struct uvc_camera_terminal_descriptor uvc_camera_terminal = {
118static const struct uvc_processing_unit_descriptor uvc_processing = { 118static const struct uvc_processing_unit_descriptor uvc_processing = {
119 .bLength = UVC_DT_PROCESSING_UNIT_SIZE(2), 119 .bLength = UVC_DT_PROCESSING_UNIT_SIZE(2),
120 .bDescriptorType = USB_DT_CS_INTERFACE, 120 .bDescriptorType = USB_DT_CS_INTERFACE,
121 .bDescriptorSubType = UVC_DT_PROCESSING_UNIT, 121 .bDescriptorSubType = UVC_VC_PROCESSING_UNIT,
122 .bUnitID = 2, 122 .bUnitID = 2,
123 .bSourceID = 1, 123 .bSourceID = 1,
124 .wMaxMultiplier = cpu_to_le16(16*1024), 124 .wMaxMultiplier = cpu_to_le16(16*1024),
@@ -131,7 +131,7 @@ static const struct uvc_processing_unit_descriptor uvc_processing = {
131static const struct uvc_output_terminal_descriptor uvc_output_terminal = { 131static const struct uvc_output_terminal_descriptor uvc_output_terminal = {
132 .bLength = UVC_DT_OUTPUT_TERMINAL_SIZE, 132 .bLength = UVC_DT_OUTPUT_TERMINAL_SIZE,
133 .bDescriptorType = USB_DT_CS_INTERFACE, 133 .bDescriptorType = USB_DT_CS_INTERFACE,
134 .bDescriptorSubType = UVC_DT_OUTPUT_TERMINAL, 134 .bDescriptorSubType = UVC_VC_OUTPUT_TERMINAL,
135 .bTerminalID = 3, 135 .bTerminalID = 3,
136 .wTerminalType = cpu_to_le16(0x0101), 136 .wTerminalType = cpu_to_le16(0x0101),
137 .bAssocTerminal = 0, 137 .bAssocTerminal = 0,
@@ -144,7 +144,7 @@ DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(1, 2);
144static const struct UVC_INPUT_HEADER_DESCRIPTOR(1, 2) uvc_input_header = { 144static const struct UVC_INPUT_HEADER_DESCRIPTOR(1, 2) uvc_input_header = {
145 .bLength = UVC_DT_INPUT_HEADER_SIZE(1, 2), 145 .bLength = UVC_DT_INPUT_HEADER_SIZE(1, 2),
146 .bDescriptorType = USB_DT_CS_INTERFACE, 146 .bDescriptorType = USB_DT_CS_INTERFACE,
147 .bDescriptorSubType = UVC_DT_INPUT_HEADER, 147 .bDescriptorSubType = UVC_VS_INPUT_HEADER,
148 .bNumFormats = 2, 148 .bNumFormats = 2,
149 .wTotalLength = 0, /* dynamic */ 149 .wTotalLength = 0, /* dynamic */
150 .bEndpointAddress = 0, /* dynamic */ 150 .bEndpointAddress = 0, /* dynamic */
@@ -161,7 +161,7 @@ static const struct UVC_INPUT_HEADER_DESCRIPTOR(1, 2) uvc_input_header = {
161static const struct uvc_format_uncompressed uvc_format_yuv = { 161static const struct uvc_format_uncompressed uvc_format_yuv = {
162 .bLength = UVC_DT_FORMAT_UNCOMPRESSED_SIZE, 162 .bLength = UVC_DT_FORMAT_UNCOMPRESSED_SIZE,
163 .bDescriptorType = USB_DT_CS_INTERFACE, 163 .bDescriptorType = USB_DT_CS_INTERFACE,
164 .bDescriptorSubType = UVC_DT_FORMAT_UNCOMPRESSED, 164 .bDescriptorSubType = UVC_VS_FORMAT_UNCOMPRESSED,
165 .bFormatIndex = 1, 165 .bFormatIndex = 1,
166 .bNumFrameDescriptors = 2, 166 .bNumFrameDescriptors = 2,
167 .guidFormat = 167 .guidFormat =
@@ -181,7 +181,7 @@ DECLARE_UVC_FRAME_UNCOMPRESSED(3);
181static const struct UVC_FRAME_UNCOMPRESSED(3) uvc_frame_yuv_360p = { 181static const struct UVC_FRAME_UNCOMPRESSED(3) uvc_frame_yuv_360p = {
182 .bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE(3), 182 .bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE(3),
183 .bDescriptorType = USB_DT_CS_INTERFACE, 183 .bDescriptorType = USB_DT_CS_INTERFACE,
184 .bDescriptorSubType = UVC_DT_FRAME_UNCOMPRESSED, 184 .bDescriptorSubType = UVC_VS_FRAME_UNCOMPRESSED,
185 .bFrameIndex = 1, 185 .bFrameIndex = 1,
186 .bmCapabilities = 0, 186 .bmCapabilities = 0,
187 .wWidth = cpu_to_le16(640), 187 .wWidth = cpu_to_le16(640),
@@ -199,7 +199,7 @@ static const struct UVC_FRAME_UNCOMPRESSED(3) uvc_frame_yuv_360p = {
199static const struct UVC_FRAME_UNCOMPRESSED(1) uvc_frame_yuv_720p = { 199static const struct UVC_FRAME_UNCOMPRESSED(1) uvc_frame_yuv_720p = {
200 .bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE(1), 200 .bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE(1),
201 .bDescriptorType = USB_DT_CS_INTERFACE, 201 .bDescriptorType = USB_DT_CS_INTERFACE,
202 .bDescriptorSubType = UVC_DT_FRAME_UNCOMPRESSED, 202 .bDescriptorSubType = UVC_VS_FRAME_UNCOMPRESSED,
203 .bFrameIndex = 2, 203 .bFrameIndex = 2,
204 .bmCapabilities = 0, 204 .bmCapabilities = 0,
205 .wWidth = cpu_to_le16(1280), 205 .wWidth = cpu_to_le16(1280),
@@ -215,7 +215,7 @@ static const struct UVC_FRAME_UNCOMPRESSED(1) uvc_frame_yuv_720p = {
215static const struct uvc_format_mjpeg uvc_format_mjpg = { 215static const struct uvc_format_mjpeg uvc_format_mjpg = {
216 .bLength = UVC_DT_FORMAT_MJPEG_SIZE, 216 .bLength = UVC_DT_FORMAT_MJPEG_SIZE,
217 .bDescriptorType = USB_DT_CS_INTERFACE, 217 .bDescriptorType = USB_DT_CS_INTERFACE,
218 .bDescriptorSubType = UVC_DT_FORMAT_MJPEG, 218 .bDescriptorSubType = UVC_VS_FORMAT_MJPEG,
219 .bFormatIndex = 2, 219 .bFormatIndex = 2,
220 .bNumFrameDescriptors = 2, 220 .bNumFrameDescriptors = 2,
221 .bmFlags = 0, 221 .bmFlags = 0,
@@ -232,7 +232,7 @@ DECLARE_UVC_FRAME_MJPEG(3);
232static const struct UVC_FRAME_MJPEG(3) uvc_frame_mjpg_360p = { 232static const struct UVC_FRAME_MJPEG(3) uvc_frame_mjpg_360p = {
233 .bLength = UVC_DT_FRAME_MJPEG_SIZE(3), 233 .bLength = UVC_DT_FRAME_MJPEG_SIZE(3),
234 .bDescriptorType = USB_DT_CS_INTERFACE, 234 .bDescriptorType = USB_DT_CS_INTERFACE,
235 .bDescriptorSubType = UVC_DT_FRAME_MJPEG, 235 .bDescriptorSubType = UVC_VS_FRAME_MJPEG,
236 .bFrameIndex = 1, 236 .bFrameIndex = 1,
237 .bmCapabilities = 0, 237 .bmCapabilities = 0,
238 .wWidth = cpu_to_le16(640), 238 .wWidth = cpu_to_le16(640),
@@ -250,7 +250,7 @@ static const struct UVC_FRAME_MJPEG(3) uvc_frame_mjpg_360p = {
250static const struct UVC_FRAME_MJPEG(1) uvc_frame_mjpg_720p = { 250static const struct UVC_FRAME_MJPEG(1) uvc_frame_mjpg_720p = {
251 .bLength = UVC_DT_FRAME_MJPEG_SIZE(1), 251 .bLength = UVC_DT_FRAME_MJPEG_SIZE(1),
252 .bDescriptorType = USB_DT_CS_INTERFACE, 252 .bDescriptorType = USB_DT_CS_INTERFACE,
253 .bDescriptorSubType = UVC_DT_FRAME_MJPEG, 253 .bDescriptorSubType = UVC_VS_FRAME_MJPEG,
254 .bFrameIndex = 2, 254 .bFrameIndex = 2,
255 .bmCapabilities = 0, 255 .bmCapabilities = 0,
256 .wWidth = cpu_to_le16(1280), 256 .wWidth = cpu_to_le16(1280),
@@ -266,7 +266,7 @@ static const struct UVC_FRAME_MJPEG(1) uvc_frame_mjpg_720p = {
266static const struct uvc_color_matching_descriptor uvc_color_matching = { 266static const struct uvc_color_matching_descriptor uvc_color_matching = {
267 .bLength = UVC_DT_COLOR_MATCHING_SIZE, 267 .bLength = UVC_DT_COLOR_MATCHING_SIZE,
268 .bDescriptorType = USB_DT_CS_INTERFACE, 268 .bDescriptorType = USB_DT_CS_INTERFACE,
269 .bDescriptorSubType = UVC_DT_COLOR_MATCHING, 269 .bDescriptorSubType = UVC_VS_COLORFORMAT,
270 .bColorPrimaries = 1, 270 .bColorPrimaries = 1,
271 .bTransferCharacteristics = 1, 271 .bTransferCharacteristics = 1,
272 .bMatrixCoefficients = 4, 272 .bMatrixCoefficients = 4,