media: atomisp: ov2722: Power on sensor from set_fmt() callback
authorHans de Goede <hdegoede@redhat.com>
Sat, 3 Dec 2022 20:16:25 +0000 (21:16 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 07:24:35 +0000 (08:24 +0100)
commitb3118a942c820c8d94a11ffd3d950660b3566d35
tree9e706e3a265d76daa83978e546e7c6bbeba333d2
parent4272fd7ae69aef86aa4c9f7d49a9d15beb50547e
media: atomisp: ov2722: Power on sensor from set_fmt() callback

Depending on which order userspace makes various v4l2 calls, the sensor
might still be powered down when set_fmt is called.

What should really happen here is delay the writing of the mode-related
registers till streaming is started, but for now use the same quick fix
as the atomisp_ov2680 / atomisp_gc0310 code and call power_up() from
set_fmt() in combination with keeping track of the power-state to avoid
doing the power-up sequence twice.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/i2c/ov2722.h