summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 10:58:26 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-15 17:12:38 -0300
commitdc5d598219ed5e914ec139d8c82d0866cdb7b8ce (patch)
tree14461f0b2e99aa288182d1577b94201122a7cad9 /drivers/media/i2c
parent4ead963009f295dc8589720d22fa4fb288be9edb (diff)
downloadop-kernel-dev-dc5d598219ed5e914ec139d8c82d0866cdb7b8ce.zip
op-kernel-dev-dc5d598219ed5e914ec139d8c82d0866cdb7b8ce.tar.gz
[media] ov772x: Stop sensor readout right after reset
The sensor starts streaming video as soon as it gets powered or is reset. Disable the output in the reset function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/soc_camera/ov772x.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/i2c/soc_camera/ov772x.c b/drivers/media/i2c/soc_camera/ov772x.c
index 76a80b6..e4a1075 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -541,9 +541,15 @@ static int ov772x_mask_set(struct i2c_client *client, u8 command, u8 mask,
static int ov772x_reset(struct i2c_client *client)
{
- int ret = ov772x_write(client, COM7, SCCB_RESET);
+ int ret;
+
+ ret = ov772x_write(client, COM7, SCCB_RESET);
+ if (ret < 0)
+ return ret;
+
msleep(1);
- return ret;
+
+ return ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE);
}
/*
OpenPOWER on IntegriCloud