23 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
25 #define MODULE_NAME "sq930x"
29 MODULE_AUTHOR(
"Jean-Francois Moine <http://moinejf.free.fr>\n"
30 "Gerard Klaver <gerard at gkall dot hobby dot nl\n"
49 #define Creative_live_motion 1
63 .sizeimage = 320 * 240,
68 .sizeimage = 640 * 480,
74 #define SQ930_CTRL_UCBUS_IO 0x0001
75 #define SQ930_CTRL_I2C_IO 0x0002
76 #define SQ930_CTRL_GPIO 0x0005
77 #define SQ930_CTRL_CAP_START 0x0010
78 #define SQ930_CTRL_CAP_STOP 0x0011
79 #define SQ930_CTRL_SET_EXPOSURE 0x001d
80 #define SQ930_CTRL_RESET 0x001e
81 #define SQ930_CTRL_GET_DEV_INFO 0x001f
84 #define SQ930_GPIO_DFL_I2C_SDA 0x0001
85 #define SQ930_GPIO_DFL_I2C_SCL 0x0002
86 #define SQ930_GPIO_RSTBAR 0x0004
87 #define SQ930_GPIO_EXTRA1 0x0040
88 #define SQ930_GPIO_EXTRA2 0x0080
90 #define SQ930_GPIO_POWER 0x0200
91 #define SQ930_GPIO_DFL_LED 0x1000
103 {0x0354, 0x00}, {0x03fa, 0x00}, {0xf800, 0x02}, {0xf801, 0xce},
104 {0xf802, 0xc1}, {0xf804, 0x00}, {0xf808, 0x00}, {0xf809, 0x0e},
105 {0xf80a, 0x01}, {0xf80b, 0xee}, {0xf807, 0x60}, {0xf80c, 0x02},
106 {0xf80d, 0xf0}, {0xf80e, 0x03}, {0xf80f, 0x0a}, {0xf81c, 0x02},
107 {0xf81d, 0xf0}, {0xf81e, 0x03}, {0xf81f, 0x0a}, {0xf83a, 0x00},
108 {0xf83b, 0x10}, {0xf83c, 0x00}, {0xf83d, 0x4e}, {0xf810, 0x04},
109 {0xf811, 0x00}, {0xf812, 0x02}, {0xf813, 0x10}, {0xf803, 0x00},
110 {0xf814, 0x01}, {0xf815, 0x18}, {0xf816, 0x00}, {0xf817, 0x48},
111 {0xf818, 0x00}, {0xf819, 0x25}, {0xf81a, 0x00}, {0xf81b, 0x3c},
112 {0xf82f, 0x03}, {0xf820, 0xff}, {0xf821, 0x0d}, {0xf822, 0xff},
113 {0xf823, 0x07}, {0xf824, 0xff}, {0xf825, 0x03}, {0xf826, 0xff},
114 {0xf827, 0x06}, {0xf828, 0xff}, {0xf829, 0x03}, {0xf82a, 0xff},
115 {0xf82b, 0x0c}, {0xf82c, 0xfd}, {0xf82d, 0x01}, {0xf82e, 0x00},
116 {0xf830, 0x00}, {0xf831, 0x47}, {0xf832, 0x00}, {0xf833, 0x00},
117 {0xf850, 0x00}, {0xf851, 0x00}, {0xf852, 0x00}, {0xf853, 0x24},
118 {0xf854, 0x00}, {0xf855, 0x18}, {0xf856, 0x00}, {0xf857, 0x3c},
119 {0xf858, 0x00}, {0xf859, 0x0c}, {0xf85a, 0x00}, {0xf85b, 0x30},
120 {0xf85c, 0x00}, {0xf85d, 0x0c}, {0xf85e, 0x00}, {0xf85f, 0x30},
121 {0xf860, 0x00}, {0xf861, 0x48}, {0xf862, 0x01}, {0xf863, 0xdc},
122 {0xf864, 0xff}, {0xf865, 0x98}, {0xf866, 0xff}, {0xf867, 0xc0},
123 {0xf868, 0xff}, {0xf869, 0x70}, {0xf86c, 0xff}, {0xf86d, 0x00},
124 {0xf86a, 0xff}, {0xf86b, 0x48}, {0xf86e, 0xff}, {0xf86f, 0x00},
125 {0xf870, 0x01}, {0xf871, 0xdb}, {0xf872, 0x01}, {0xf873, 0xfa},
126 {0xf874, 0x01}, {0xf875, 0xdb}, {0xf876, 0x01}, {0xf877, 0xfa},
127 {0xf878, 0x0f}, {0xf879, 0x0f}, {0xf87a, 0xff}, {0xf87b, 0xff},
131 {0xf5f0, 0x00}, {0xf5f1, 0xcd}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
133 {0xf5f0, 0x49}, {0xf5f1, 0xcd}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
135 {0xf5fa, 0x00}, {0xf5f6, 0x00}, {0xf5f7, 0x00}, {0xf5f8, 0x00},
140 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x82}, {0xf806, 0x00},
141 {0xf807, 0x7f}, {0xf800, 0x03},
142 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x40}, {0xf806, 0x00},
143 {0xf807, 0x7f}, {0xf800, 0x03},
144 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0xcf}, {0xf806, 0xd0},
145 {0xf807, 0x7f}, {0xf800, 0x03},
146 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x00}, {0xf806, 0x00},
147 {0xf807, 0x7f}, {0xf800, 0x03}
151 {0x0354, 0x00}, {0x03fa, 0x00}, {0xf800, 0x02}, {0xf801, 0xbe},
152 {0xf802, 0xc6}, {0xf804, 0x00}, {0xf808, 0x00}, {0xf809, 0x06},
153 {0xf80a, 0x01}, {0xf80b, 0xfe}, {0xf807, 0x84}, {0xf80c, 0x02},
154 {0xf80d, 0xf7}, {0xf80e, 0x03}, {0xf80f, 0x0b}, {0xf81c, 0x00},
155 {0xf81d, 0x49}, {0xf81e, 0x03}, {0xf81f, 0x0b}, {0xf83a, 0x00},
156 {0xf83b, 0x01}, {0xf83c, 0x00}, {0xf83d, 0x6b}, {0xf810, 0x03},
157 {0xf811, 0x10}, {0xf812, 0x02}, {0xf813, 0x6f}, {0xf803, 0x00},
158 {0xf814, 0x00}, {0xf815, 0x44}, {0xf816, 0x00}, {0xf817, 0x48},
159 {0xf818, 0x00}, {0xf819, 0x25}, {0xf81a, 0x00}, {0xf81b, 0x3c},
160 {0xf82f, 0x03}, {0xf820, 0xff}, {0xf821, 0x0d}, {0xf822, 0xff},
161 {0xf823, 0x07}, {0xf824, 0xfd}, {0xf825, 0x07}, {0xf826, 0xf0},
162 {0xf827, 0x0c}, {0xf828, 0xff}, {0xf829, 0x03}, {0xf82a, 0xff},
163 {0xf82b, 0x0c}, {0xf82c, 0xfc}, {0xf82d, 0x01}, {0xf82e, 0x00},
164 {0xf830, 0x00}, {0xf831, 0x47}, {0xf832, 0x00}, {0xf833, 0x00},
165 {0xf850, 0x00}, {0xf851, 0x00}, {0xf852, 0x00}, {0xf853, 0x24},
166 {0xf854, 0x00}, {0xf855, 0x0c}, {0xf856, 0x00}, {0xf857, 0x30},
167 {0xf858, 0x00}, {0xf859, 0x18}, {0xf85a, 0x00}, {0xf85b, 0x3c},
168 {0xf85c, 0x00}, {0xf85d, 0x18}, {0xf85e, 0x00}, {0xf85f, 0x3c},
169 {0xf860, 0xff}, {0xf861, 0x37}, {0xf862, 0xff}, {0xf863, 0x1d},
170 {0xf864, 0xff}, {0xf865, 0x98}, {0xf866, 0xff}, {0xf867, 0xc0},
171 {0xf868, 0x00}, {0xf869, 0x37}, {0xf86c, 0x02}, {0xf86d, 0x1d},
172 {0xf86a, 0x00}, {0xf86b, 0x37}, {0xf86e, 0x02}, {0xf86f, 0x1d},
173 {0xf870, 0x01}, {0xf871, 0xc6}, {0xf872, 0x02}, {0xf873, 0x04},
174 {0xf874, 0x01}, {0xf875, 0xc6}, {0xf876, 0x02}, {0xf877, 0x04},
175 {0xf878, 0x0f}, {0xf879, 0x0f}, {0xf87a, 0xff}, {0xf87b, 0xff},
179 {0xf5f0, 0x00}, {0xf5f1, 0xff}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
181 {0xf5f0, 0x40}, {0xf5f1, 0xff}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
183 {0xf5fa, 0x00}, {0xf5f6, 0x00}, {0xf5f7, 0x00}, {0xf5f8, 0x00},
188 {0xf5f0, 0x00}, {0xf5f1, 0xff}, {0xf5f2, 0x88}, {0xf5f3, 0x88},
190 {0xf5f0, 0x40}, {0xf5f1, 0xff}, {0xf5f2, 0x88}, {0xf5f3, 0x88},
192 {0xf5fa, 0x00}, {0xf5f6, 0x00}, {0xf5f7, 0x00}, {0xf5f8, 0x00},
197 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x80}, {0xf806, 0x00},
198 {0xf807, 0x7f}, {0xf800, 0x03},
199 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x4e}, {0xf806, 0x00},
200 {0xf807, 0x7f}, {0xf800, 0x03},
201 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0xc0}, {0xf806, 0x48},
202 {0xf807, 0x7f}, {0xf800, 0x03},
203 {0xf800, 0x02}, {0xf807, 0xff}, {0xf805, 0x00}, {0xf806, 0x00},
204 {0xf807, 0x7f}, {0xf800, 0x03}
208 {0x0354, 0x00}, {0x03fa, 0x00}, {0xf332, 0xcc}, {0xf333, 0xcc},
209 {0xf334, 0xcc}, {0xf335, 0xcc}, {0xf33f, 0x00}
229 {0xf5f0, 0x11}, {0xf5f1, 0x99}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
231 {0xf5f0, 0x51}, {0xf5f1, 0x99}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
233 {0xf5fa, 0x00}, {0xf5f6, 0x00}, {0xf5f7, 0x00}, {0xf5f8, 0x00},
267 {0xf5f0, 0x11}, {0xf5f1, 0x96}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
269 {0xf5f0, 0x51}, {0xf5f1, 0x96}, {0xf5f2, 0x80}, {0xf5f3, 0x80},
271 {0xf5fa, 0x00}, {0xf5f6, 0x0a}, {0xf5f7, 0x0a}, {0xf5f8, 0x0a},
283 {0x0354, 0x00}, {0x03fa, 0x00}, {0xf332, 0x00}, {0xf333, 0xc0},
284 {0xf334, 0x39}, {0xf335, 0xe7}, {0xf33f, 0x03}
288 {0x0354, 0x00}, {0x03fa, 0x00}, {0xf332, 0x00}, {0xf333, 0x00},
289 {0xf334, 0x3e}, {0xf335, 0xf8}, {0xf33f, 0x03}
293 static const struct cap_s {
296 } capconfig[4][2] = {
299 {0x05, 0x1f, 0x20, 0x0e, 0x00, 0x9f, 0x02, 0xee,
300 0x01, 0x01, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0,
302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
304 {0x01, 0x1f, 0x20, 0x0e, 0x00, 0x9f, 0x02, 0xee,
305 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
306 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
307 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
311 {0x05, 0x22, 0x20, 0x0e, 0x00, 0xa2, 0x02, 0xee,
312 0x01, 0x01, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
313 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
314 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
316 {0x01, 0x22, 0x20, 0x0e, 0x00, 0xa2, 0x02, 0xee,
317 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
318 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
319 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
323 {0x05, 0x02, 0x20, 0x01, 0x20, 0x82, 0x02, 0xe1,
324 0x01, 0x01, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
325 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
328 {0x01, 0x02, 0x20, 0x01, 0x20, 0x82, 0x02, 0xe1,
329 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
331 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
335 {0x05, 0x02, 0x20, 0x01, 0x20, 0x82, 0x02, 0xe1,
336 0x01, 0x01, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
337 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
340 {0x01, 0x02, 0x20, 0x01, 0x20, 0x82, 0x02, 0xe1,
341 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8,
342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },
356 static const struct sensor_s sensor_tb[] = {
433 usb_rcvctrlpipe(gspca_dev->
dev, 0),
436 value, 0, gspca_dev->
usb_buf, len,
439 pr_err(
"reg_r %04x failed %d\n", value, ret);
444 static void reg_w(
struct gspca_dev *gspca_dev,
u16 value,
u16 index)
450 PDEBUG(D_USBO,
"reg_w v: %04x i: %04x", value, index);
452 usb_sndctrlpipe(gspca_dev->
dev, 0),
455 value, index,
NULL, 0,
459 pr_err(
"reg_w %04x %04x failed %d\n", value, index, ret);
464 static void reg_wb(
struct gspca_dev *gspca_dev,
u16 value,
u16 index,
471 PDEBUG(D_USBO,
"reg_wb v: %04x i: %04x %02x...%02x",
472 value, index, *data, data[len - 1]);
475 usb_sndctrlpipe(gspca_dev->
dev, 0),
478 value, index, gspca_dev->
usb_buf, len,
482 pr_err(
"reg_wb %04x %04x failed %d\n", value, index, ret);
491 struct gspca_dev *gspca_dev = &sd->
gspca_dev;
500 sensor = &sensor_tb[sd->
sensor];
503 idx = (cmd->
val & 0xff00) | cmd->
reg;
509 while (--ncmds > 0) {
512 *buf++ = cmd->
val >> 8;
517 PDEBUG(D_USBO,
"i2c_w v: %04x i: %04x %02x...%02x",
518 val, idx, gspca_dev->
usb_buf[0], buf[-1]);
520 usb_sndctrlpipe(gspca_dev->
dev, 0),
527 pr_err(
"i2c_write failed %d\n", ret);
532 static void ucbus_write(
struct gspca_dev *gspca_dev,
546 pr_err(
"Bug: usb_buf overflow\n");
569 PDEBUG(D_USBO,
"ucbus v: %04x i: %04x %02x...%02x",
571 gspca_dev->
usb_buf[0], buf[-1]);
573 PDEBUG(D_USBO,
"ucbus v: %04x i: %04x",
576 usb_sndctrlpipe(gspca_dev->
dev, 0),
583 pr_err(
"ucbus_write failed %d\n", ret);
594 static void gpio_set(
struct sd *sd,
u16 val,
u16 mask)
596 struct gspca_dev *gspca_dev = &sd->
gspca_dev;
599 sd->
gpio[0] &= ~mask;
607 sd->
gpio[1] &= ~mask;
617 gpio_set(sd, *gpio++, 0x000f);
618 gpio_set(sd, *gpio++, 0x000f);
619 gpio_set(sd, *gpio++, 0x000f);
620 gpio_set(sd, *gpio++, 0x000f);
621 gpio_set(sd, *gpio, 0x000f);
624 static void bridge_init(
struct sd *sd)
630 ucbus_write(&sd->
gspca_dev, &clkfreq_cmd, 1, 1);
635 static void cmos_probe(
struct gspca_dev *gspca_dev)
637 struct sd *sd = (
struct sd *) gspca_dev;
640 static const u8 probe_order[] = {
648 for (i = 0; i <
ARRAY_SIZE(probe_order); i++) {
649 sensor = &sensor_tb[probe_order[
i]];
653 reg_r(gspca_dev, (sensor->
i2c_addr << 8) | 0x001c, 1);
655 if (gspca_dev->
usb_buf[0] != 0)
659 pr_err(
"Unknown sensor\n");
667 pr_err(
"Sensor %s not yet treated\n",
674 static void mt9v111_init(
struct gspca_dev *gspca_dev)
677 static const u8 cmd_001b[] = {
678 0x00, 0x3b, 0xf6, 0x01, 0x03, 0x02, 0x00, 0x00,
681 static const u8 cmd_011b[][7] = {
682 {0x10, 0x01, 0x66, 0x08, 0x00, 0x00, 0x00},
683 {0x01, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00},
684 {0x20, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00},
685 {0x02, 0x01, 0xae, 0x01, 0x00, 0x00, 0x00},
688 reg_wb(gspca_dev, 0x001b, 0x0000, cmd_001b,
sizeof cmd_001b);
690 reg_wb(gspca_dev, 0x001b, 0x0000, cmd_011b[i],
695 reg_r(gspca_dev, 0x031b, 1);
700 PDEBUG(D_PROBE,
"mt9v111_init timeout");
709 static void global_init(
struct sd *sd,
int first_time)
723 gpio_set(sd, 0, 0x00ff);
750 static void lz24bp_ppl(
struct sd *sd,
u16 ppl)
760 static void setexposure(
struct gspca_dev *gspca_dev,
s32 expo,
s32 gain)
762 struct sd *sd = (
struct sd *) gspca_dev;
763 int i, integclks, intstartclk, frameclks, min_frclk;
776 if (integclks >= min_frclk) {
778 frameclks = integclks;
780 intstartclk = min_frclk - integclks;
781 frameclks = min_frclk;
783 buf[i++] = intstartclk >> 8;
784 buf[i++] = intstartclk;
785 buf[i++] = frameclks >> 8;
786 buf[i++] = frameclks;
793 sensor = &sensor_tb[sd->
sensor];
797 buf[i++] = integclks >> 8;
799 buf[i++] = integclks;
803 buf[i++] = 0x80 + gain / 2;
811 reg_wb(gspca_dev, cmd, 0, buf, i);
815 static int sd_config(
struct gspca_dev *gspca_dev,
818 struct sd *sd = (
struct sd *) gspca_dev;
821 sd->
sensor =
id->driver_info >> 8;
822 sd->
type =
id->driver_info;
833 static int sd_init(
struct gspca_dev *gspca_dev)
835 struct sd *sd = (
struct sd *) gspca_dev;
873 if (gspca_dev->
usb_buf[5] == 0xf6)
876 cmos_probe(gspca_dev);
886 static void send_start(
struct gspca_dev *gspca_dev)
888 struct sd *sd = (
struct sd *) gspca_dev;
889 const struct cap_s *
cap;
892 mode = gspca_dev->
cam.cam_mode[gspca_dev->
curr_mode].priv;
895 0x0a00 | cap->cc_sizeid,
899 static void send_stop(
struct gspca_dev *gspca_dev)
905 static int sd_isoc_init(
struct gspca_dev *gspca_dev)
907 struct sd *sd = (
struct sd *) gspca_dev;
909 gspca_dev->
cam.bulk_nurbs = 1;
911 gspca_dev->
cam.bulk_size = gspca_dev->
width * gspca_dev->
height + 8;
916 static int sd_start(
struct gspca_dev *gspca_dev)
918 struct sd *sd = (
struct sd *) gspca_dev;
927 ucbus_write(gspca_dev, icx098bq_start_0,
930 ucbus_write(gspca_dev, icx098bq_start_1,
933 ucbus_write(gspca_dev, icx098bq_start_2,
939 send_start(gspca_dev);
943 gpio_set(sd, 0x7f, 0x00ff);
946 send_start(gspca_dev);
950 ucbus_write(gspca_dev, lz24bp_start_0,
954 ucbus_write(gspca_dev, lz24bp_start_1_gen,
958 ucbus_write(gspca_dev, lz24bp_start_1_clm,
961 ucbus_write(gspca_dev, lz24bp_start_2,
964 mode = gspca_dev->
cam.cam_mode[gspca_dev->
curr_mode].priv;
965 lz24bp_ppl(sd, mode == 1 ? 0x0564 : 0x0310);
969 ucbus_write(gspca_dev, mi0360_start_0,
978 ucbus_write(gspca_dev, mi0360_start_1,
987 send_start(gspca_dev);
989 send_stop(gspca_dev);
996 ucbus_write(gspca_dev, mi0360_start_0,
1005 ucbus_write(gspca_dev, mt9v111_start_1,
1015 send_start(gspca_dev);
1027 static void sd_stopN(
struct gspca_dev *gspca_dev)
1029 struct sd *sd = (
struct sd *) gspca_dev;
1033 send_stop(gspca_dev);
1038 static void sd_dq_callback(
struct gspca_dev *gspca_dev)
1040 struct sd *sd = (
struct sd *) gspca_dev;
1043 if (!sd->
do_ctrl || gspca_dev->
cam.bulk_nurbs != 0)
1050 gspca_dev->
cam.bulk_nurbs = 1;
1053 pr_err(
"sd_dq_callback() err %d\n", ret);
1059 static void sd_pkt_scan(
struct gspca_dev *gspca_dev,
1063 struct sd *sd = (
struct sd *) gspca_dev;
1066 gspca_dev->
cam.bulk_nurbs = 0;
1074 struct gspca_dev *gspca_dev =
1076 struct sd *sd = (
struct sd *) gspca_dev;
1085 setexposure(gspca_dev, ctrl->
val, sd->
gain->val);
1092 .s_ctrl = sd_s_ctrl,
1095 static int sd_init_controls(
struct gspca_dev *gspca_dev)
1098 struct sd *sd = (
struct sd *) gspca_dev;
1100 gspca_dev->
vdev.ctrl_handler = hdl;
1108 pr_err(
"Could not initialize controls\n");
1118 .config = sd_config,
1120 .init_controls = sd_init_controls,
1121 .isoc_init = sd_isoc_init,
1124 .pkt_scan = sd_pkt_scan,
1125 .dq_callback = sd_dq_callback,
1129 #define ST(sensor, type) \
1130 .driver_info = (SENSOR_ ## sensor << 8) \
1133 {USB_DEVICE(0x041e, 0x4038),
ST(MI0360, 0)},
1134 {USB_DEVICE(0x041e, 0x403c),
ST(LZ24BP, 0)},
1135 {USB_DEVICE(0x041e, 0x403d),
ST(LZ24BP, 0)},
1137 {USB_DEVICE(0x2770, 0x930b),
ST(MI0360, 0)},
1138 {USB_DEVICE(0x2770, 0x930c),
ST(MI0360, 0)},
1152 static struct usb_driver sd_driver = {
1154 .id_table = device_table,
1158 .suspend = gspca_suspend,
1159 .resume = gspca_resume,
1160 .reset_resume = gspca_resume,