]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] ov772x: Stop sensor readout right after reset
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 18 Jul 2012 13:58:26 +0000 (10:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 15 Aug 2012 20:12:38 +0000 (17:12 -0300)
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>
drivers/media/i2c/soc_camera/ov772x.c

index 76a80b65240796e4f38635b62930304d1e57d3ac..e4a10751894dc477c3de6010323882ed7020f2c4 100644 (file)
@@ -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);
 }
 
 /*