aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9v011.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9v011.c')
-rw-r--r--drivers/media/video/mt9v011.c14
1 files changed, 9 insertions, 5 deletions
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}