Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc5d5982 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4ead9630
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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);
	msleep(1);
	int ret;

	ret = ov772x_write(client, COM7, SCCB_RESET);
	if (ret < 0)
		return ret;

	msleep(1);

	return ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE);
}

/*