diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-27 07:24:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-13 19:39:02 -0400 |
commit | 296544e15a7126373851abd40acc526b79b91432 (patch) | |
tree | 82e968d69bc42e541e5cb33a6873b0051f249f8d /drivers/media/video/mt9v011.c | |
parent | 225aeb1c5863bc92c6bb1f921e9a6cf4d15dbb2a (diff) |
V4L/DVB (12340): mtv9v011: Add a missing chip version to the driver
Some mt9v011 webcams report 0x8332 chip version, instead of 0x8243. From
the revision history at the mt9v011 datasheet, it seems that the chip
version has changed from the first release of the chip.
Thanks-to hermann pitton <hermann-pitton@arcor.de> for pointing this to
me, on his tests with a Silvercrest webcam.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v011.c')
-rw-r--r-- | drivers/media/video/mt9v011.c | 14 |
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, | |||
393 | static int mt9v011_g_chip_ident(struct v4l2_subdev *sd, | 393 | static 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 | ||
402 | static const struct v4l2_subdev_core_ops mt9v011_core_ops = { | 405 | static 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 | } |