From 2c9c4f9647ac422d6f04e4cd1d2594a5fb46c6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= Date: Tue, 22 Mar 2011 06:07:40 -0300 Subject: [PATCH] --- yaml --- r: 242139 b: refs/heads/master c: 088fc390bd2d6af547043b4579bf52d1c163c702 h: refs/heads/master i: 242137: b403e90376492c3579cf4877ef523063b6f8fcf7 242135: 5b56df014d97512b07ffcd408096ab0f8540e1ee v: v3 --- [refs] | 2 +- trunk/drivers/media/video/gspca/nw80x.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2f340ab21a23..f42a63393c4c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 152507144a59d74423a25e1ba80f4f7f17449417 +refs/heads/master: 088fc390bd2d6af547043b4579bf52d1c163c702 diff --git a/trunk/drivers/media/video/gspca/nw80x.c b/trunk/drivers/media/video/gspca/nw80x.c index cfab8973e95c..b6d7c8dbb94f 100644 --- a/trunk/drivers/media/video/gspca/nw80x.c +++ b/trunk/drivers/media/video/gspca/nw80x.c @@ -1768,6 +1768,8 @@ static int sd_config(struct gspca_dev *gspca_dev, * If 0x0500 does not exist => NW802 * If it does, test 0x109b. If it doesn't exist, * then it's a NW801. Else, a NW800 + * If a et31x110 (nw800 and 06a5:d800) + * get the sensor ID */ if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) { sd->bridge = BRIDGE_NW802; @@ -1777,6 +1779,24 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->bridge = BRIDGE_NW801; if (sd->webcam == Generic800) sd->webcam = P35u; + } else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) { + reg_r(gspca_dev, 0x0403, 1); /* GPIO */ + PDEBUG(D_PROBE, "et31x110 sensor type %02x", + gspca_dev->usb_buf[0]); + switch (gspca_dev->usb_buf[0] >> 1) { + case 0x00: /* ?? */ + if (sd->webcam == Generic800) + sd->webcam = SpaceCam; + break; + case 0x01: /* Hynix? */ + if (sd->webcam == Generic800) + sd->webcam = Twinkle; + break; + case 0x0a: /* Pixart */ + if (sd->webcam == Generic800) + sd->webcam = SpaceCam2; + break; + } } if (webcam_chip[sd->webcam] != sd->bridge) { err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge);