aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-12 09:56:21 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 13:03:23 -0400
commit8b220793d6fd309176438721088515be893630cd (patch)
tree2f587213bd745c77e159ff8135d93c7485325bb3 /drivers/media
parent8a2e6990f44d4cebaafcc0af1a786912ae733bb2 (diff)
V4L/DVB (12235): em28xx: detects sensors also with the generic em2750/2750 entry
Webcams in general don't have eeprom. So, the sensor hint code should be called to properly detect what sensor is inside. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 9e71f034665d..e64e1242a1ba 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -205,7 +205,7 @@ static struct em28xx_reg_seq silvercrest_reg_seq[] = {
205 */ 205 */
206struct em28xx_board em28xx_boards[] = { 206struct em28xx_board em28xx_boards[] = {
207 [EM2750_BOARD_UNKNOWN] = { 207 [EM2750_BOARD_UNKNOWN] = {
208 .name = "Unknown EM2750/EM2751 webcam grabber", 208 .name = "EM2710/EM2750/EM2751 webcam grabber",
209 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, 209 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
210 .tuner_type = TUNER_ABSENT, 210 .tuner_type = TUNER_ABSENT,
211 .is_webcam = 1, 211 .is_webcam = 1,
@@ -1720,7 +1720,8 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1720 __be16 version_be; 1720 __be16 version_be;
1721 u16 version; 1721 u16 version;
1722 1722
1723 if (dev->model != EM2820_BOARD_UNKNOWN) 1723 if (dev->model != EM2820_BOARD_UNKNOWN &&
1724 dev->model != EM2750_BOARD_UNKNOWN)
1724 return 0; 1725 return 0;
1725 1726
1726 dev->i2c_client.addr = 0xba >> 1; 1727 dev->i2c_client.addr = 0xba >> 1;
@@ -1738,11 +1739,11 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1738 sensor_name = "mt9v011"; 1739 sensor_name = "mt9v011";
1739 break; 1740 break;
1740 default: 1741 default:
1741 printk("Unknown Sensor 0x%04x\n", be16_to_cpu(version)); 1742 printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
1742 return -EINVAL; 1743 return -EINVAL;
1743 } 1744 }
1744 1745
1745 em28xx_errdev("Sensor is %s, assuming that webcam is %s\n", 1746 em28xx_errdev("Sensor is %s, using model %s entry.\n",
1746 sensor_name, em28xx_boards[dev->model].name); 1747 sensor_name, em28xx_boards[dev->model].name);
1747 1748
1748 return 0; 1749 return 0;