summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian Hemp <c.hemp@phytec.de>2011-10-25 14:11:41 +0200
committerJustin Waters <justin.waters@timesys.com>2013-11-07 12:19:28 -0500
commit13fbc9a4bee13bd208ace24fc3322596b8794169 (patch)
tree13c3cd998ad72fa27a63a13694bc88d39db0052b /drivers
parent0e87697a8bf1999110ddd9580fe7fcc0422bbad8 (diff)
mt9m001: Fix the testpattern bit overwritten.
In the driver the testpattern bit (bit 6) are overwritten. To correct this issue the first bit is to be masked. Signed-off-by: Heiko Fendrich <h.fendrich@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mt9m001.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index e2bbd8c35c98..d9ab0f51041c 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -150,7 +150,7 @@ static int mt9m001_init(struct i2c_client *client)
/* Disable chip, synchronous option update */
if (!ret)
- ret = reg_write(client, MT9M001_OUTPUT_CONTROL, 0);
+ ret = reg_clear(client, MT9M001_OUTPUT_CONTROL, 0x0002);
return ret;
}
@@ -160,7 +160,8 @@ static int mt9m001_s_stream(struct v4l2_subdev *sd, int enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
/* Switch to master "normal" mode or stop sensor readout */
- if (reg_write(client, MT9M001_OUTPUT_CONTROL, enable ? 2 : 0) < 0)
+ if (enable ? reg_set(client, MT9M001_OUTPUT_CONTROL, 0x0002) :
+ reg_clear(client, MT9M001_OUTPUT_CONTROL, 0x0002))
return -EIO;
return 0;
}