Skip to content

Commit

Permalink
[media] ov772x: Stop sensor readout right after reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Aug 15, 2012
1 parent 4ead963 commit dc5d598
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/media/i2c/soc_camera/ov772x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit dc5d598

Please sign in to comment.