Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156754
b: refs/heads/master
c: 296544e
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Aug 13, 2009
1 parent 3d2a06a commit fce5f61
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 225aeb1c5863bc92c6bb1f921e9a6cf4d15dbb2a
refs/heads/master: 296544e15a7126373851abd40acc526b79b91432
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,8 @@ static int em28xx_hint_sensor(struct em28xx *dev)
version = be16_to_cpu(version_be);

switch (version) {
case 0x8243: /* mt9v011 640x480 1.3 Mpix sensor */
case 0x8232: /* mt9v011 640x480 1.3 Mpix sensor */
case 0x8243: /* mt9v011 rev B 640x480 1.3 Mpix sensor */
dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
sensor_name = "mt9v011";
dev->em28xx_sensor = EM28XX_MT9V011;
Expand Down
14 changes: 9 additions & 5 deletions trunk/drivers/media/video/mt9v011.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ static int mt9v011_s_register(struct v4l2_subdev *sd,
static int mt9v011_g_chip_ident(struct v4l2_subdev *sd,
struct v4l2_dbg_chip_ident *chip)
{
u16 version;
struct i2c_client *client = v4l2_get_subdevdata(sd);

version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);

return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_MT9V011,
MT9V011_VERSION);
version);
}

static const struct v4l2_subdev_core_ops mt9v011_core_ops = {
Expand Down Expand Up @@ -449,8 +452,9 @@ static int mt9v011_probe(struct i2c_client *c,

/* Check if the sensor is really a MT9V011 */
version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
if (version != MT9V011_VERSION) {
v4l2_info(sd, "*** unknown micron chip detected (0x%04x.\n",
if ((version != MT9V011_VERSION) &&
(version != MT9V011_REV_B_VERSION)) {
v4l2_info(sd, "*** unknown micron chip detected (0x%04x).\n",
version);
kfree(core);
return -EINVAL;
Expand All @@ -461,8 +465,8 @@ static int mt9v011_probe(struct i2c_client *c,
core->height = 480;
core->xtal = 27000000; /* Hz */

v4l_info(c, "chip found @ 0x%02x (%s)\n",
c->addr << 1, c->adapter->name);
v4l_info(c, "chip found @ 0x%02x (%s - chip version 0x%04x)\n",
c->addr << 1, c->adapter->name, version);

return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/mt9v011.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define R35_MT9V011_GLOBAL_GAIN 0x35
#define RF1_MT9V011_CHIP_ENABLE 0xf1

#define MT9V011_VERSION 0x8243
#define MT9V011_VERSION 0x8232
#define MT9V011_REV_B_VERSION 0x8243

#endif

0 comments on commit fce5f61

Please sign in to comment.