Lines Matching +full:0 +full:x8006
36 u8 len = (i2c_data > 0xff) ? 2 : 1; in stv06xx_write_bridge()
38 buf[0] = i2c_data & 0xff; in stv06xx_write_bridge()
39 buf[1] = (i2c_data >> 8) & 0xff; in stv06xx_write_bridge()
41 err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in stv06xx_write_bridge()
42 0x04, 0x40, address, 0, buf, len, in stv06xx_write_bridge()
45 gspca_dbg(gspca_dev, D_CONF, "Written 0x%x to address 0x%x, status: %d\n", in stv06xx_write_bridge()
48 return (err < 0) ? err : 0; in stv06xx_write_bridge()
58 err = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in stv06xx_read_bridge()
59 0x04, 0xc0, address, 0, buf, 1, in stv06xx_read_bridge()
62 *i2c_data = buf[0]; in stv06xx_read_bridge()
64 gspca_dbg(gspca_dev, D_CONF, "Reading 0x%x from address 0x%x, status %d\n", in stv06xx_read_bridge()
67 return (err < 0) ? err : 0; in stv06xx_read_bridge()
85 int err = 0; in stv06xx_write_sensor_finish()
91 buf[0] = 0; in stv06xx_write_sensor_finish()
92 err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in stv06xx_write_sensor_finish()
93 0x04, 0x40, 0x1704, 0, buf, 1, in stv06xx_write_sensor_finish()
97 return (err < 0) ? err : 0; in stv06xx_write_sensor_finish()
109 for (i = 0; i < len;) { in stv06xx_write_sensor_bytes()
111 memset(buf, 0, I2C_BUFFER_LENGTH); in stv06xx_write_sensor_bytes()
112 for (j = 0; j < I2C_MAX_BYTES && i < len; j++, i++) { in stv06xx_write_sensor_bytes()
114 buf[0x10 + j] = data[2*i+1]; in stv06xx_write_sensor_bytes()
115 gspca_dbg(gspca_dev, D_CONF, "I2C: Writing 0x%02x to reg 0x%02x\n", in stv06xx_write_sensor_bytes()
118 buf[0x20] = sd->sensor->i2c_addr; in stv06xx_write_sensor_bytes()
119 buf[0x21] = j - 1; /* Number of commands to send - 1 */ in stv06xx_write_sensor_bytes()
120 buf[0x22] = I2C_WRITE_CMD; in stv06xx_write_sensor_bytes()
121 err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in stv06xx_write_sensor_bytes()
122 0x04, 0x40, 0x0400, 0, buf, in stv06xx_write_sensor_bytes()
125 if (err < 0) in stv06xx_write_sensor_bytes()
141 for (i = 0; i < len;) { in stv06xx_write_sensor_words()
143 memset(buf, 0, I2C_BUFFER_LENGTH); in stv06xx_write_sensor_words()
144 for (j = 0; j < I2C_MAX_WORDS && i < len; j++, i++) { in stv06xx_write_sensor_words()
146 buf[0x10 + j * 2] = data[2*i+1]; in stv06xx_write_sensor_words()
147 buf[0x10 + j * 2 + 1] = data[2*i+1] >> 8; in stv06xx_write_sensor_words()
148 gspca_dbg(gspca_dev, D_CONF, "I2C: Writing 0x%04x to reg 0x%02x\n", in stv06xx_write_sensor_words()
151 buf[0x20] = sd->sensor->i2c_addr; in stv06xx_write_sensor_words()
152 buf[0x21] = j - 1; /* Number of commands to send - 1 */ in stv06xx_write_sensor_words()
153 buf[0x22] = I2C_WRITE_CMD; in stv06xx_write_sensor_words()
154 err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in stv06xx_write_sensor_words()
155 0x04, 0x40, 0x0400, 0, buf, in stv06xx_write_sensor_words()
158 if (err < 0) in stv06xx_write_sensor_words()
172 if (err < 0) in stv06xx_read_sensor()
176 memset(buf, 0, I2C_BUFFER_LENGTH); in stv06xx_read_sensor()
178 buf[0] = address; in stv06xx_read_sensor()
179 buf[0x20] = sd->sensor->i2c_addr; in stv06xx_read_sensor()
180 buf[0x21] = 0; in stv06xx_read_sensor()
183 buf[0x22] = I2C_READ_CMD; in stv06xx_read_sensor()
185 err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in stv06xx_read_sensor()
186 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, in stv06xx_read_sensor()
188 if (err < 0) { in stv06xx_read_sensor()
193 err = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in stv06xx_read_sensor()
194 0x04, 0xc0, 0x1410, 0, buf, sd->sensor->i2c_len, in stv06xx_read_sensor()
197 *value = buf[0] | (buf[1] << 8); in stv06xx_read_sensor()
199 *value = buf[0]; in stv06xx_read_sensor()
201 gspca_dbg(gspca_dev, D_CONF, "I2C: Read 0x%x from address 0x%x, status: %d\n", in stv06xx_read_sensor()
204 return (err < 0) ? err : 0; in stv06xx_read_sensor()
214 for (i = 0x1400; i < 0x160f; i++) { in stv06xx_dump_bridge()
217 pr_info("Read 0x%x from address 0x%x\n", data, i); in stv06xx_dump_bridge()
221 for (i = 0x1400; i < 0x160f; i++) { in stv06xx_dump_bridge()
225 stv06xx_write_bridge(sd, i, 0xff); in stv06xx_dump_bridge()
227 if (data == 0xff) in stv06xx_dump_bridge()
228 pr_info("Register 0x%x is read/write\n", i); in stv06xx_dump_bridge()
230 pr_info("Register 0x%x is read/write, but only partially\n", in stv06xx_dump_bridge()
233 pr_info("Register 0x%x is read-only\n", i); in stv06xx_dump_bridge()
256 return (err < 0) ? err : 0; in stv06xx_init()
288 packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); in stv06xx_start()
290 if (err < 0) in stv06xx_start()
295 if (err < 0) in stv06xx_start()
302 if (err < 0) in stv06xx_start()
307 return (err < 0) ? err : 0; in stv06xx_start()
316 intfc = gspca_dev->dev->actconfig->intf_cache[0]; in stv06xx_isoc_init()
327 alt->endpoint[0].desc.wMaxPacketSize = in stv06xx_isoc_init()
330 return 0; in stv06xx_isoc_init()
343 alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; in stv06xx_isoc_nego()
344 packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); in stv06xx_isoc_nego()
352 alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(packet_size); in stv06xx_isoc_nego()
355 if (ret < 0) in stv06xx_isoc_nego()
367 err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 0); in stv06xx_stopN()
368 if (err < 0) in stv06xx_stopN()
374 if (err < 0) in stv06xx_stopN()
411 id = (data[0] << 8) | data[1]; in stv06xx_pkt_scan()
428 if (sd->bridge == BRIDGE_ST6422 && (id & 0xff00) == 0x0200) in stv06xx_pkt_scan()
432 case 0x0200: in stv06xx_pkt_scan()
433 case 0x4200: in stv06xx_pkt_scan()
450 case 0x8001: in stv06xx_pkt_scan()
451 case 0x8005: in stv06xx_pkt_scan()
452 case 0xc001: in stv06xx_pkt_scan()
453 case 0xc005: in stv06xx_pkt_scan()
458 NULL, 0); in stv06xx_pkt_scan()
467 case 0x8002: in stv06xx_pkt_scan()
468 case 0x8006: in stv06xx_pkt_scan()
469 case 0xc002: in stv06xx_pkt_scan()
474 NULL, 0); in stv06xx_pkt_scan()
480 case 0x0005: in stv06xx_pkt_scan()
481 gspca_dbg(gspca_dev, D_PACK, "Chunk 0x005 detected\n"); in stv06xx_pkt_scan()
487 case 0x0100: in stv06xx_pkt_scan()
488 gspca_dbg(gspca_dev, D_PACK, "Chunk 0x0100 detected\n"); in stv06xx_pkt_scan()
492 case 0x42ff: in stv06xx_pkt_scan()
493 gspca_dbg(gspca_dev, D_PACK, "Chunk 0x42ff detected\n"); in stv06xx_pkt_scan()
497 gspca_dbg(gspca_dev, D_PACK, "Unknown chunk 0x%04x detected\n", in stv06xx_pkt_scan()
513 if (len == 1 && (data[0] == 0x80 || data[0] == 0x10)) { in sd_int_pkt_scan()
516 ret = 0; in sd_int_pkt_scan()
519 if (len == 1 && (data[0] == 0x88 || data[0] == 0x11)) { in sd_int_pkt_scan()
520 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); in sd_int_pkt_scan()
522 ret = 0; in sd_int_pkt_scan()
573 return 0; in stv06xx_config()
577 return 0; in stv06xx_config()
581 return 0; in stv06xx_config()
585 return 0; in stv06xx_config()
589 return 0; in stv06xx_config()
599 {USB_DEVICE(0x046d, 0x0840), .driver_info = BRIDGE_STV600 }, /* QuickCam Express */
600 {USB_DEVICE(0x046d, 0x0850), .driver_info = BRIDGE_STV610 }, /* LEGO cam / QuickCam Web */
601 {USB_DEVICE(0x046d, 0x0870), .driver_info = BRIDGE_STV602 }, /* Dexxa WebCam USB */
602 {USB_DEVICE(0x046D, 0x08F0), .driver_info = BRIDGE_ST6422 }, /* QuickCam Messenger */
603 {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, /* QuickCam Communicate */
604 {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, /* QuickCam Messenger (new) */