[Letux-kernel] [RFC v4] media: i2c: ov9655: fix a copy&paste error which made the camer stay in sleep after first use

H. Nikolaus Schaller hns at goldelico.com
Wed Dec 2 14:40:05 CET 2020


The first use calls ov9655_s_stream(..., false) when the stream is closed.

Due to this bug the call with ov9655_s_stream(..., true) on the next open
did write the AEC register and not COM2.

Therefore it was only possible to open and use the camera module
once after power-on reset (where the module was already enabled and not
in SLEEP)

Signed-off-by: H. Nikolaus Schaller <hns at goldelico.com>
---
 drivers/media/i2c/ov9655.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov9655.c b/drivers/media/i2c/ov9655.c
index f3fa664257d5fb..e66d9651085c2c 100644
--- a/drivers/media/i2c/ov9655.c
+++ b/drivers/media/i2c/ov9655.c
@@ -898,7 +898,7 @@ static int ov9655_s_stream(struct v4l2_subdev *subdev, int enable)
 		return ret;
 
 	/* take out of soft sleep */
-	return ov9655_update_bits(client, COM2_SLEEP,
+	return ov9655_update_bits(client, REG_COM2,
 				COM2_SLEEP, 0x00);
 }
 
-- 
2.26.2



More information about the Letux-kernel mailing list