Commit 8eed52e1 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp-ov2680: Move ov2680_init_registers() call to power_up()

Move ov2680_init_registers() call to power_up(), so that we also
init the registers on code-paths which do not call ov2680_s_power()
like running camorama.

Link: https://lore.kernel.org/linux-media/20211107171549.267583-6-hdegoede@redhat.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b821cea5
......@@ -744,9 +744,15 @@ static int power_up(struct v4l2_subdev *sd)
/* according to DS, 20ms is needed between PWDN and i2c access */
msleep(20);
ret = ov2680_init_registers(sd);
if (ret)
goto fail_init_registers;
dev->power_on = true;
return 0;
fail_init_registers:
dev->platform_data->flisclk_ctrl(sd, 0);
fail_clk:
gpio_ctrl(sd, 0);
fail_power:
......@@ -807,8 +813,6 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)
ret = power_down(sd);
} else {
ret = power_up(sd);
if (!ret)
ret = ov2680_init_registers(sd);
}
mutex_unlock(&dev->input_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment