Commit 881cd418 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (11449): gspca - zc3xx: Bad probe of many webcams since adcm2700 addition.

Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 24441631
...@@ -6868,7 +6868,6 @@ static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { ...@@ -6868,7 +6868,6 @@ static const struct sensor_by_chipset_revision chipset_revision_sensor[] = {
{0x8001, 0x13}, {0x8001, 0x13},
{0x8000, 0x14}, /* CS2102K */ {0x8000, 0x14}, /* CS2102K */
{0x8400, 0x15}, /* TAS5130K */ {0x8400, 0x15}, /* TAS5130K */
{0x4001, 0x16}, /* ADCM2700 */
}; };
static int vga_3wr_probe(struct gspca_dev *gspca_dev) static int vga_3wr_probe(struct gspca_dev *gspca_dev)
...@@ -6904,12 +6903,15 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) ...@@ -6904,12 +6903,15 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
retword |= reg_r(gspca_dev, 0x000a); retword |= reg_r(gspca_dev, 0x000a);
PDEBUG(D_PROBE, "probe 3wr vga 1 0x%04x", retword); PDEBUG(D_PROBE, "probe 3wr vga 1 0x%04x", retword);
reg_r(gspca_dev, 0x0010); reg_r(gspca_dev, 0x0010);
/* this is tested only once anyway */ /* value 0x4001 is meaningless */
if (retword != 0x4001) {
for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) { for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) {
if (chipset_revision_sensor[i].revision == retword) { if (chipset_revision_sensor[i].revision == retword) {
sd->chip_revision = retword; sd->chip_revision = retword;
send_unknown(dev, SENSOR_PB0330); send_unknown(dev, SENSOR_PB0330);
return chipset_revision_sensor[i].internal_sensor_id; return chipset_revision_sensor[i]
.internal_sensor_id;
}
} }
} }
...@@ -6980,12 +6982,12 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) ...@@ -6980,12 +6982,12 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
reg_w(dev, 0x01, 0x0001); reg_w(dev, 0x01, 0x0001);
reg_w(dev, 0x03, 0x0012); reg_w(dev, 0x03, 0x0012);
reg_w(dev, 0x01, 0x0012); reg_w(dev, 0x01, 0x0012);
reg_w(dev, 0x05, 0x0001); reg_w(dev, 0x05, 0x0012);
reg_w(dev, 0xd3, 0x008b); reg_w(dev, 0xd3, 0x008b);
retword = i2c_read(gspca_dev, 0x01); retword = i2c_read(gspca_dev, 0x01);
if (retword != 0) { if (retword != 0) {
PDEBUG(D_PROBE, "probe 3wr vga type 0a ? ret: %04x", retword); PDEBUG(D_PROBE, "probe 3wr vga type 0a ? ret: %04x", retword);
return retword; return 0x16; /* adcm2700 (6100/6200) */
} }
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment