aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c3
-rw-r--r--drivers/media/video/mt9v011.c14
-rw-r--r--drivers/media/video/mt9v011.h3
3 files changed, 13 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 320f1f60276e..bc213a1f9c1f 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1771,7 +1771,8 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1771 version = be16_to_cpu(version_be); 1771 version = be16_to_cpu(version_be);
1772 1772
1773 switch (version) { 1773 switch (version) {
1774 case 0x8243: /* mt9v011 640x480 1.3 Mpix sensor */ 1774 case 0x8232: /* mt9v011 640x480 1.3 Mpix sensor */
1775 case 0x8243: /* mt9v011 rev B 640x480 1.3 Mpix sensor */
1775 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; 1776 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
1776 sensor_name = "mt9v011"; 1777 sensor_name = "mt9v011";
1777 dev->em28xx_sensor = EM28XX_MT9V011; 1778 dev->em28xx_sensor = EM28XX_MT9V011;
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c
index b2260de645f0..c14bf47d6928 100644
--- a/drivers/media/video/mt9v011.c
+++ b/drivers/media/video/mt9v011.c
@@ -393,10 +393,13 @@ static int mt9v011_s_register(struct v4l2_subdev *sd,
393static int mt9v011_g_chip_ident(struct v4l2_subdev *sd, 393static int mt9v011_g_chip_ident(struct v4l2_subdev *sd,
394 struct v4l2_dbg_chip_ident *chip) 394 struct v4l2_dbg_chip_ident *chip)
395{ 395{
396 u16 version;
396 struct i2c_client *client = v4l2_get_subdevdata(sd); 397 struct i2c_client *client = v4l2_get_subdevdata(sd);
397 398
399 version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
400
398 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_MT9V011, 401 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_MT9V011,
399 MT9V011_VERSION); 402 version);
400} 403}
401 404
402static const struct v4l2_subdev_core_ops mt9v011_core_ops = { 405static const struct v4l2_subdev_core_ops mt9v011_core_ops = {
@@ -449,8 +452,9 @@ static int mt9v011_probe(struct i2c_client *c,
449 452
450 /* Check if the sensor is really a MT9V011 */ 453 /* Check if the sensor is really a MT9V011 */
451 version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION); 454 version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
452 if (version != MT9V011_VERSION) { 455 if ((version != MT9V011_VERSION) &&
453 v4l2_info(sd, "*** unknown micron chip detected (0x%04x.\n", 456 (version != MT9V011_REV_B_VERSION)) {
457 v4l2_info(sd, "*** unknown micron chip detected (0x%04x).\n",
454 version); 458 version);
455 kfree(core); 459 kfree(core);
456 return -EINVAL; 460 return -EINVAL;
@@ -461,8 +465,8 @@ static int mt9v011_probe(struct i2c_client *c,
461 core->height = 480; 465 core->height = 480;
462 core->xtal = 27000000; /* Hz */ 466 core->xtal = 27000000; /* Hz */
463 467
464 v4l_info(c, "chip found @ 0x%02x (%s)\n", 468 v4l_info(c, "chip found @ 0x%02x (%s - chip version 0x%04x)\n",
465 c->addr << 1, c->adapter->name); 469 c->addr << 1, c->adapter->name, version);
466 470
467 return 0; 471 return 0;
468} 472}
diff --git a/drivers/media/video/mt9v011.h b/drivers/media/video/mt9v011.h
index 9e443ee30558..3350fd6083c3 100644
--- a/drivers/media/video/mt9v011.h
+++ b/drivers/media/video/mt9v011.h
@@ -30,6 +30,7 @@
30#define R35_MT9V011_GLOBAL_GAIN 0x35 30#define R35_MT9V011_GLOBAL_GAIN 0x35
31#define RF1_MT9V011_CHIP_ENABLE 0xf1 31#define RF1_MT9V011_CHIP_ENABLE 0xf1
32 32
33#define MT9V011_VERSION 0x8243 33#define MT9V011_VERSION 0x8232
34#define MT9V011_REV_B_VERSION 0x8243
34 35
35#endif 36#endif