2 * Quickcam cameras initialization data
4 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #define MODULE_NAME "tv8532"
25 #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0)
26 static const char version[] = "2.1.0";
28 MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
29 MODULE_DESCRIPTION("TV8532 USB Camera Driver");
30 MODULE_LICENSE("GPL");
32 /* specific webcam descriptor */
34 struct gspca_dev gspca_dev; /* !! must be the first item */
36 int buflen; /* current length of tmpbuf */
37 __u8 tmpbuf[352 * 288 + 10 * 288]; /* no protection... */
38 __u8 tmpbuf2[352 * 288]; /* no protection... */
40 unsigned short brightness;
41 unsigned short contrast;
47 /* V4L2 controls supported by the driver */
48 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
49 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
50 static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val);
51 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
53 static struct ctrl sd_ctrls[] = {
54 #define SD_BRIGHTNESS 0
57 .id = V4L2_CID_BRIGHTNESS,
58 .type = V4L2_CTRL_TYPE_INTEGER,
63 .default_value = 0x18f,
65 .set = sd_setbrightness,
66 .get = sd_getbrightness,
71 .id = V4L2_CID_CONTRAST,
72 .type = V4L2_CTRL_TYPE_INTEGER,
77 .default_value = 0x7fff,
79 .set = sd_setcontrast,
80 .get = sd_getcontrast,
84 static struct cam_mode sif_mode[] = {
85 {V4L2_PIX_FMT_SBGGR8, 176, 144, 1},
86 {V4L2_PIX_FMT_SBGGR8, 352, 288, 0},
90 * Initialization data: this is the first set-up data written to the
91 * device (before the open data).
93 #define TESTCLK 0x10 /* reg 0x2c -> 0x12 //10 */
94 #define TESTCOMP 0x90 /* reg 0x28 -> 0x80 */
95 #define TESTLINE 0x81 /* reg 0x29 -> 0x81 */
96 #define QCIFLINE 0x41 /* reg 0x29 -> 0x81 */
97 #define TESTPTL 0x14 /* reg 0x2D -> 0x14 */
98 #define TESTPTH 0x01 /* reg 0x2E -> 0x01 */
99 #define TESTPTBL 0x12 /* reg 0x2F -> 0x0a */
100 #define TESTPTBH 0x01 /* reg 0x30 -> 0x01 */
101 #define ADWIDTHL 0xe8 /* reg 0x0c -> 0xe8 */
102 #define ADWIDTHH 0x03 /* reg 0x0d -> 0x03 */
103 #define ADHEIGHL 0x90 /* reg 0x0e -> 0x91 //93 */
104 #define ADHEIGHH 0x01 /* reg 0x0f -> 0x01 */
105 #define EXPOL 0x8f /* reg 0x1c -> 0x8f */
106 #define EXPOH 0x01 /* reg 0x1d -> 0x01 */
107 #define ADCBEGINL 0x44 /* reg 0x10 -> 0x46 //47 */
108 #define ADCBEGINH 0x00 /* reg 0x11 -> 0x00 */
109 #define ADRBEGINL 0x0a /* reg 0x14 -> 0x0b //0x0c */
110 #define ADRBEGINH 0x00 /* reg 0x15 -> 0x00 */
111 #define TV8532_CMD_UPDATE 0x84
113 #define TV8532_EEprom_Add 0x03
114 #define TV8532_EEprom_DataL 0x04
115 #define TV8532_EEprom_DataM 0x05
116 #define TV8532_EEprom_DataH 0x06
117 #define TV8532_EEprom_TableLength 0x07
118 #define TV8532_EEprom_Write 0x08
119 #define TV8532_PART_CTRL 0x00
120 #define TV8532_CTRL 0x01
121 #define TV8532_CMD_EEprom_Open 0x30
122 #define TV8532_CMD_EEprom_Close 0x29
123 #define TV8532_UDP_UPDATE 0x31
124 #define TV8532_GPIO 0x39
125 #define TV8532_GPIO_OE 0x3B
126 #define TV8532_REQ_RegWrite 0x02
127 #define TV8532_REQ_RegRead 0x03
129 #define TV8532_ADWIDTH_L 0x0C
130 #define TV8532_ADWIDTH_H 0x0D
131 #define TV8532_ADHEIGHT_L 0x0E
132 #define TV8532_ADHEIGHT_H 0x0F
133 #define TV8532_EXPOSURE 0x1C
134 #define TV8532_QUANT_COMP 0x28
135 #define TV8532_MODE_PACKET 0x29
136 #define TV8532_SETCLK 0x2C
137 #define TV8532_POINT_L 0x2D
138 #define TV8532_POINT_H 0x2E
139 #define TV8532_POINTB_L 0x2F
140 #define TV8532_POINTB_H 0x30
141 #define TV8532_BUDGET_L 0x2A
142 #define TV8532_BUDGET_H 0x2B
143 #define TV8532_VID_L 0x34
144 #define TV8532_VID_H 0x35
145 #define TV8532_PID_L 0x36
146 #define TV8532_PID_H 0x37
147 #define TV8532_DeviceID 0x83
148 #define TV8532_AD_SLOPE 0x91
149 #define TV8532_AD_BITCTRL 0x94
150 #define TV8532_AD_COLBEGIN_L 0x10
151 #define TV8532_AD_COLBEGIN_H 0x11
152 #define TV8532_AD_ROWBEGIN_L 0x14
153 #define TV8532_AD_ROWBEGIN_H 0x15
155 static __u32 tv_8532_eeprom_data[] = {
156 /* add dataL dataM dataH */
157 0x00010001, 0x01018011, 0x02050014, 0x0305001c,
158 0x040d001e, 0x0505001f, 0x06050519, 0x0705011b,
159 0x0805091e, 0x090d892e, 0x0a05892f, 0x0b050dd9,
163 static void reg_r(struct usb_device *dev,
164 __u16 index, __u8 *buffer)
167 usb_rcvctrlpipe(dev, 0),
169 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
171 index, buffer, sizeof(__u8),
175 static void reg_w(struct usb_device *dev,
176 __u16 index, __u8 *buffer, __u16 length)
179 usb_sndctrlpipe(dev, 0),
181 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
183 index, buffer, length, 500);
186 static void tv_8532WriteEEprom(struct gspca_dev *gspca_dev)
189 __u8 reg, data0, data1, data2, datacmd;
190 struct usb_device *dev = gspca_dev->dev;
193 reg_w(dev, TV8532_GPIO, &datacmd, 1);
194 datacmd = TV8532_CMD_EEprom_Open;
195 reg_w(dev, TV8532_CTRL, &datacmd, 1);
197 while (tv_8532_eeprom_data[i]) {
198 reg = (tv_8532_eeprom_data[i] & 0xff000000) >> 24;
199 reg_w(dev, TV8532_EEprom_Add, ®, 1);
201 data0 = (tv_8532_eeprom_data[i] & 0x000000ff);
202 reg_w(dev, TV8532_EEprom_DataL, &data0, 1);
204 data1 = (tv_8532_eeprom_data[i] & 0x0000FF00) >> 8;
205 reg_w(dev, TV8532_EEprom_DataM, &data1, 1);
207 data2 = (tv_8532_eeprom_data[i] & 0x00FF0000) >> 16;
208 reg_w(dev, TV8532_EEprom_DataH, &data2, 1);
211 reg_w(dev, TV8532_EEprom_Write, &datacmd, 1);
216 reg_w(dev, TV8532_EEprom_TableLength, &datacmd, 1);
218 datacmd = TV8532_CMD_EEprom_Close;
219 reg_w(dev, TV8532_CTRL, &datacmd, 1);
223 /* this function is called at probe time */
224 static int sd_config(struct gspca_dev *gspca_dev,
225 const struct usb_device_id *id)
227 struct sd *sd = (struct sd *) gspca_dev;
230 tv_8532WriteEEprom(gspca_dev);
232 cam = &gspca_dev->cam;
233 cam->dev_name = (char *) id->driver_info;
235 cam->cam_mode = sif_mode;
236 cam->nmodes = sizeof sif_mode / sizeof sif_mode[0];
238 sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value;
239 sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value;
243 static void tv_8532ReadRegisters(struct gspca_dev *gspca_dev)
245 struct usb_device *dev = gspca_dev->dev;
247 /* __u16 vid, pid; */
249 reg_r(dev, 0x0001, &data);
250 PDEBUG(D_USBI, "register 0x01-> %x", data);
251 reg_r(dev, 0x0002, &data);
252 PDEBUG(D_USBI, "register 0x02-> %x", data);
253 reg_r(dev, TV8532_ADWIDTH_L, &data);
254 reg_r(dev, TV8532_ADWIDTH_H, &data);
255 reg_r(dev, TV8532_QUANT_COMP, &data);
256 reg_r(dev, TV8532_MODE_PACKET, &data);
257 reg_r(dev, TV8532_SETCLK, &data);
258 reg_r(dev, TV8532_POINT_L, &data);
259 reg_r(dev, TV8532_POINT_H, &data);
260 reg_r(dev, TV8532_POINTB_L, &data);
261 reg_r(dev, TV8532_POINTB_H, &data);
262 reg_r(dev, TV8532_BUDGET_L, &data);
263 reg_r(dev, TV8532_BUDGET_H, &data);
264 reg_r(dev, TV8532_VID_L, &data);
265 reg_r(dev, TV8532_VID_H, &data);
266 reg_r(dev, TV8532_PID_L, &data);
267 reg_r(dev, TV8532_PID_H, &data);
268 reg_r(dev, TV8532_DeviceID, &data);
269 reg_r(dev, TV8532_AD_COLBEGIN_L, &data);
270 reg_r(dev, TV8532_AD_COLBEGIN_H, &data);
271 reg_r(dev, TV8532_AD_ROWBEGIN_L, &data);
272 reg_r(dev, TV8532_AD_ROWBEGIN_H, &data);
275 static void tv_8532_setReg(struct gspca_dev *gspca_dev)
277 struct usb_device *dev = gspca_dev->dev;
279 __u8 value[2] = { 0, 0 };
282 reg_w(dev, TV8532_AD_COLBEGIN_L, &data, 1); /* 0x10 */
283 data = ADCBEGINH; /* also digital gain */
284 reg_w(dev, TV8532_AD_COLBEGIN_H, &data, 1);
285 data = TV8532_CMD_UPDATE;
286 reg_w(dev, TV8532_PART_CTRL, &data, 1); /* 0x00<-0x84 */
289 reg_w(dev, TV8532_GPIO_OE, &data, 1);
290 /******************************************************/
292 reg_w(dev, TV8532_ADHEIGHT_L, &data, 1); /* 0e */
294 reg_w(dev, TV8532_ADHEIGHT_H, &data, 1); /* 0f */
296 value[1] = EXPOH; /* 350d 0x014c; */
297 reg_w(dev, TV8532_EXPOSURE, value, 2); /* 1c */
299 reg_w(dev, TV8532_AD_COLBEGIN_L, &data, 1); /* 0x10 */
300 data = ADCBEGINH; /* also digital gain */
301 reg_w(dev, TV8532_AD_COLBEGIN_H, &data, 1);
303 reg_w(dev, TV8532_AD_ROWBEGIN_L, &data, 1); /* 0x14 */
306 reg_w(dev, TV8532_AD_SLOPE, &data, 1); /* 0x91 */
308 reg_w(dev, TV8532_AD_BITCTRL, &data, 1); /* 0x94 */
311 data = TV8532_CMD_EEprom_Close;
312 reg_w(dev, TV8532_CTRL, &data, 1); /* 0x01 */
315 reg_w(dev, TV8532_AD_SLOPE, &data, 1); /* 0x91 */
316 data = TV8532_CMD_UPDATE;
317 reg_w(dev, TV8532_PART_CTRL, &data, 1); /* 0x00<-0x84 */
320 static void tv_8532_PollReg(struct gspca_dev *gspca_dev)
322 struct usb_device *dev = gspca_dev->dev;
326 /* strange polling from tgc */
327 for (i = 0; i < 10; i++) {
328 data = TESTCLK; /* 0x48; //0x08; */
329 reg_w(dev, TV8532_SETCLK, &data, 1); /* 0x2c */
330 data = TV8532_CMD_UPDATE;
331 reg_w(dev, TV8532_PART_CTRL, &data, 1);
333 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
337 /* this function is called at open time */
338 static int sd_open(struct gspca_dev *gspca_dev)
340 struct usb_device *dev = gspca_dev->dev;
343 __u8 value[2] = { 0, 0 };
346 reg_w(dev, TV8532_AD_SLOPE, &data, 1);
348 reg_w(dev, TV8532_AD_BITCTRL, &data, 1);
349 tv_8532ReadRegisters(gspca_dev);
351 reg_w(dev, TV8532_GPIO_OE, &data, 1);
353 value[1] = ADHEIGHH; /* 401d 0x0169; */
354 reg_w(dev, TV8532_ADHEIGHT_L, value, 2); /* 0e */
356 value[1] = EXPOH; /* 350d 0x014c; */
357 reg_w(dev, TV8532_EXPOSURE, value, 2); /* 1c */
358 data = ADWIDTHL; /* 0x20; */
359 reg_w(dev, TV8532_ADWIDTH_L, &data, 1); /* 0x0c */
361 reg_w(dev, TV8532_ADWIDTH_H, &data, 1); /* 0x0d */
363 /*******************************************************************/
364 data = TESTCOMP; /* 0x72 compressed mode */
365 reg_w(dev, TV8532_QUANT_COMP, &data, 1); /* 0x28 */
366 data = TESTLINE; /* 0x84; // CIF | 4 packet */
367 reg_w(dev, TV8532_MODE_PACKET, &data, 1); /* 0x29 */
369 /************************************************/
370 data = TESTCLK; /* 0x48; //0x08; */
371 reg_w(dev, TV8532_SETCLK, &data, 1); /* 0x2c */
372 data = TESTPTL; /* 0x38; */
373 reg_w(dev, TV8532_POINT_L, &data, 1); /* 0x2d */
374 data = TESTPTH; /* 0x04; */
375 reg_w(dev, TV8532_POINT_H, &data, 1); /* 0x2e */
376 dataStart = TESTPTBL; /* 0x04; */
377 reg_w(dev, TV8532_POINTB_L, &dataStart, 1); /* 0x2f */
378 data = TESTPTBH; /* 0x04; */
379 reg_w(dev, TV8532_POINTB_H, &data, 1); /* 0x30 */
380 data = TV8532_CMD_UPDATE;
381 reg_w(dev, TV8532_PART_CTRL, &data, 1); /* 0x00<-0x84 */
382 /*************************************************/
384 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
387 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
388 /*************************************************/
389 tv_8532_setReg(gspca_dev);
390 /*************************************************/
392 reg_w(dev, TV8532_GPIO_OE, &data, 1);
393 /*************************************************/
394 tv_8532_setReg(gspca_dev);
395 /*************************************************/
396 tv_8532_PollReg(gspca_dev);
400 static void setbrightness(struct gspca_dev *gspca_dev)
402 struct sd *sd = (struct sd *) gspca_dev;
405 int brightness = sd->brightness;
407 value[1] = (brightness >> 8) & 0xff;
408 value[0] = (brightness) & 0xff;
409 reg_w(gspca_dev->dev, TV8532_EXPOSURE, value, 2); /* 1c */
410 data = TV8532_CMD_UPDATE;
411 reg_w(gspca_dev->dev, TV8532_PART_CTRL, &data, 1);
414 /* -- start the camera -- */
415 static void sd_start(struct gspca_dev *gspca_dev)
417 struct usb_device *dev = gspca_dev->dev;
422 reg_w(dev, TV8532_AD_SLOPE, &data, 1);
424 reg_w(dev, TV8532_AD_BITCTRL, &data, 1);
425 tv_8532ReadRegisters(gspca_dev);
427 reg_w(dev, TV8532_GPIO_OE, &data, 1);
429 value[1] = ADHEIGHH; /* 401d 0x0169; */
430 reg_w(dev, TV8532_ADHEIGHT_L, value, 2); /* 0e */
431 /* value[0] = EXPOL; value[1] =EXPOH; * 350d 0x014c; */
432 /* reg_w(dev,TV8532_REQ_RegWrite,0,TV8532_EXPOSURE,value,2); * 1c */
433 setbrightness(gspca_dev);
435 data = ADWIDTHL; /* 0x20; */
436 reg_w(dev, TV8532_ADWIDTH_L, &data, 1); /* 0x0c */
438 reg_w(dev, TV8532_ADWIDTH_H, &data, 1); /* 0x0d */
440 /************************************************/
441 data = TESTCOMP; /* 0x72 compressed mode */
442 reg_w(dev, TV8532_QUANT_COMP, &data, 1); /* 0x28 */
443 if (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode) {
445 data = QCIFLINE; /* 0x84; // CIF | 4 packet */
446 reg_w(dev, TV8532_MODE_PACKET, &data, 1); /* 0x29 */
449 data = TESTLINE; /* 0x84; // CIF | 4 packet */
450 reg_w(dev, TV8532_MODE_PACKET, &data, 1); /* 0x29 */
452 /************************************************/
453 data = TESTCLK; /* 0x48; //0x08; */
454 reg_w(dev, TV8532_SETCLK, &data, 1); /* 0x2c */
455 data = TESTPTL; /* 0x38; */
456 reg_w(dev, TV8532_POINT_L, &data, 1); /* 0x2d */
457 data = TESTPTH; /* 0x04; */
458 reg_w(dev, TV8532_POINT_H, &data, 1); /* 0x2e */
459 data = TESTPTBL; /* 0x04; */
460 reg_w(dev, TV8532_POINTB_L, &data, 1); /* 0x2f */
461 data = TESTPTBH; /* 0x04; */
462 reg_w(dev, TV8532_POINTB_H, &data, 1); /* 0x30 */
463 data = TV8532_CMD_UPDATE;
464 reg_w(dev, TV8532_PART_CTRL, &data, 1); /* 0x00<-0x84 */
465 /************************************************/
467 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
470 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
471 /************************************************/
472 tv_8532_setReg(gspca_dev);
473 /************************************************/
475 reg_w(dev, TV8532_GPIO_OE, &data, 1);
476 /************************************************/
477 tv_8532_setReg(gspca_dev);
478 /************************************************/
479 tv_8532_PollReg(gspca_dev);
481 reg_w(dev, TV8532_UDP_UPDATE, &data, 1); /* 0x31 */
484 static void sd_stopN(struct gspca_dev *gspca_dev)
486 struct usb_device *dev = gspca_dev->dev;
490 reg_w(dev, TV8532_GPIO_OE, &data, 1);
493 static void sd_stop0(struct gspca_dev *gspca_dev)
497 static void sd_close(struct gspca_dev *gspca_dev)
501 static void tv8532_preprocess(struct gspca_dev *gspca_dev)
503 struct sd *sd = (struct sd *) gspca_dev;
504 /* we should received a whole frame with header and EOL marker
505 * in gspca_dev->tmpbuf and return a GBRG pattern in gspca_dev->tmpbuf2
506 * sequence 2bytes header the Alternate pixels bayer GB 4 bytes
507 * Alternate pixels bayer RG 4 bytes EOL */
508 int width = gspca_dev->width;
509 int height = gspca_dev->height;
510 unsigned char *dst = sd->tmpbuf2;
511 unsigned char *data = sd->tmpbuf;
514 /* precompute where is the good bayer line */
515 if (((data[3] + data[width + 7]) >> 1)
517 + (data[width + 6] >> 1) >= ((data[2] + data[width + 6]) >> 1)
519 + (data[width + 5] >> 1))
523 for (i = 0; i < height / 2; i++) {
524 memcpy(dst, data, width);
527 memcpy(dst, data, width);
533 static void sd_pkt_scan(struct gspca_dev *gspca_dev,
534 struct gspca_frame *frame, /* target */
535 __u8 *data, /* isoc packet */
536 int len) /* iso packet length */
538 struct sd *sd = (struct sd *) gspca_dev;
540 if (data[0] != 0x80) {
542 if (sd->buflen + len > sizeof sd->tmpbuf) {
543 if (gspca_dev->last_packet_type != DISCARD_PACKET) {
544 PDEBUG(D_PACK, "buffer overflow");
545 gspca_dev->last_packet_type = DISCARD_PACKET;
549 memcpy(&sd->tmpbuf[sd->buflen], data, len);
554 /* here we detect 0x80 */
555 /* counter is limited so we need few header for a frame :) */
557 /* header 0x80 0x80 0x80 0x80 0x80 */
558 /* packet 00 63 127 145 00 */
561 /* update sequence */
562 if (sd->packet == 63 || sd->packet == 127)
565 /* is there a frame start ? */
566 if (sd->packet >= (gspca_dev->height >> 1) - 1) {
567 PDEBUG(D_PACK, "SOF > %d packet %d", sd->synchro,
569 if (!sd->synchro) { /* start of frame */
570 if (gspca_dev->last_packet_type == FIRST_PACKET) {
571 tv8532_preprocess(gspca_dev);
572 frame = gspca_frame_add(gspca_dev,
578 gspca_frame_add(gspca_dev, FIRST_PACKET,
580 memcpy(sd->tmpbuf, data, len);
585 if (gspca_dev->last_packet_type != DISCARD_PACKET) {
587 "Warning wrong TV8532 frame detection %d",
589 gspca_dev->last_packet_type = DISCARD_PACKET;
595 /* Drop packet frame corrupt */
596 PDEBUG(D_PACK, "DROP SOF %d packet %d",
597 sd->synchro, sd->packet);
599 gspca_dev->last_packet_type = DISCARD_PACKET;
604 memcpy(&sd->tmpbuf[sd->buflen], data, len);
608 static void setcontrast(struct gspca_dev *gspca_dev)
612 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val)
614 struct sd *sd = (struct sd *) gspca_dev;
616 sd->brightness = val;
617 if (gspca_dev->streaming)
618 setbrightness(gspca_dev);
622 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val)
624 struct sd *sd = (struct sd *) gspca_dev;
626 *val = sd->brightness;
630 static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val)
632 struct sd *sd = (struct sd *) gspca_dev;
635 if (gspca_dev->streaming)
636 setcontrast(gspca_dev);
640 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val)
642 struct sd *sd = (struct sd *) gspca_dev;
648 /* sub-driver description */
649 static struct sd_desc sd_desc = {
652 .nctrls = ARRAY_SIZE(sd_ctrls),
659 .pkt_scan = sd_pkt_scan,
662 /* -- module initialisation -- */
663 #define DVNM(name) .driver_info = (kernel_ulong_t) name
664 static __devinitdata struct usb_device_id device_table[] = {
665 {USB_DEVICE(0x046d, 0x0920), DVNM("QC Express")},
666 {USB_DEVICE(0x046d, 0x0921), DVNM("Labtec Webcam")},
667 {USB_DEVICE(0x0545, 0x808b), DVNM("Veo Stingray")},
668 {USB_DEVICE(0x0545, 0x8333), DVNM("Veo Stingray")},
669 {USB_DEVICE(0x0923, 0x010f), DVNM("ICM532 cams")},
673 MODULE_DEVICE_TABLE(usb, device_table);
675 /* -- device connect -- */
676 static int sd_probe(struct usb_interface *intf,
677 const struct usb_device_id *id)
679 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
683 static struct usb_driver sd_driver = {
685 .id_table = device_table,
687 .disconnect = gspca_disconnect,
690 /* -- module insert / remove -- */
691 static int __init sd_mod_init(void)
693 if (usb_register(&sd_driver) < 0)
695 PDEBUG(D_PROBE, "v%s registered", version);
699 static void __exit sd_mod_exit(void)
701 usb_deregister(&sd_driver);
702 PDEBUG(D_PROBE, "deregistered");
705 module_init(sd_mod_init);
706 module_exit(sd_mod_exit);