diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-03-22 05:07:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 15:38:24 -0400 |
commit | 088fc390bd2d6af547043b4579bf52d1c163c702 (patch) | |
tree | 817befbe19a2f12a482c0e3e9e908e5b5d040c12 /drivers/media | |
parent | 152507144a59d74423a25e1ba80f4f7f17449417 (diff) |
[media] gspca - nw80x: Get the sensor ID when bridge et31x110
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/nw80x.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index cfab8973e95c..b6d7c8dbb94f 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c | |||
@@ -1768,6 +1768,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1768 | * If 0x0500 does not exist => NW802 | 1768 | * If 0x0500 does not exist => NW802 |
1769 | * If it does, test 0x109b. If it doesn't exist, | 1769 | * If it does, test 0x109b. If it doesn't exist, |
1770 | * then it's a NW801. Else, a NW800 | 1770 | * then it's a NW801. Else, a NW800 |
1771 | * If a et31x110 (nw800 and 06a5:d800) | ||
1772 | * get the sensor ID | ||
1771 | */ | 1773 | */ |
1772 | if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) { | 1774 | if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) { |
1773 | sd->bridge = BRIDGE_NW802; | 1775 | sd->bridge = BRIDGE_NW802; |
@@ -1777,6 +1779,24 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1777 | sd->bridge = BRIDGE_NW801; | 1779 | sd->bridge = BRIDGE_NW801; |
1778 | if (sd->webcam == Generic800) | 1780 | if (sd->webcam == Generic800) |
1779 | sd->webcam = P35u; | 1781 | sd->webcam = P35u; |
1782 | } else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) { | ||
1783 | reg_r(gspca_dev, 0x0403, 1); /* GPIO */ | ||
1784 | PDEBUG(D_PROBE, "et31x110 sensor type %02x", | ||
1785 | gspca_dev->usb_buf[0]); | ||
1786 | switch (gspca_dev->usb_buf[0] >> 1) { | ||
1787 | case 0x00: /* ?? */ | ||
1788 | if (sd->webcam == Generic800) | ||
1789 | sd->webcam = SpaceCam; | ||
1790 | break; | ||
1791 | case 0x01: /* Hynix? */ | ||
1792 | if (sd->webcam == Generic800) | ||
1793 | sd->webcam = Twinkle; | ||
1794 | break; | ||
1795 | case 0x0a: /* Pixart */ | ||
1796 | if (sd->webcam == Generic800) | ||
1797 | sd->webcam = SpaceCam2; | ||
1798 | break; | ||
1799 | } | ||
1780 | } | 1800 | } |
1781 | if (webcam_chip[sd->webcam] != sd->bridge) { | 1801 | if (webcam_chip[sd->webcam] != sd->bridge) { |
1782 | err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge); | 1802 | err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge); |