media: atomisp: ov2680: Add init_cfg pad-op
authorHans de Goede <hdegoede@redhat.com>
Mon, 29 May 2023 10:37:25 +0000 (11:37 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 14:23:27 +0000 (15:23 +0100)
commitb1b2d3992623290833f7f4ddea1986c7f123f3ad
tree2cf41aaf0db3762422fb74c79cde138fd9626130
parentc1ee1db3c936c09141020007a11da24660c5393f
media: atomisp: ov2680: Add init_cfg pad-op

Having an init_cfg to initialize the passed in subdev-state is
important to make which == V4L2_SUBDEV_FORMAT_TRY ops work when
userspace is talking to a /dev/v4l2-subdev# node.

Copy the ov2680_init_cfg() from the standard drivers/media/i2c/ov2680.c
driver.

This is esp. relevant once support for cropping is added where
the v4l2_subdev_state.pads[pad].try_crop rectangle needs to be set
correctly for set_fmt which == V4L2_SUBDEV_FORMAT_TRY calls to work.

Link: https://lore.kernel.org/r/20230529103741.11904-6-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c