media: ov5640: Fix soft reset sequence and timings
authorJai Luthra <j-luthra@ti.com>
Tue, 3 Jan 2023 12:27:35 +0000 (13:27 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 6 Feb 2023 07:27:54 +0000 (08:27 +0100)
commitdecea0a98b7ac04536c7d659f74783e8d67a06c0
treefda7d727b9a06cabd3a5eebc37f75116b42cccc7
parent51c2bf13a42d82d519660dbfd6ea8f3bf0d962b8
media: ov5640: Fix soft reset sequence and timings

Move the register-based reset out of the init_setting[] and into the
powerup_sequence function. The sensor is power cycled and reset using
the gpio pins so the soft reset is not always necessary.

This also ensures that soft reset honors the timing sequence
from the datasheet [1].

[1] https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf

Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver")
Reported-by: Nishanth Menon <nm@ti.com>
Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonaboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5640.c