OSDN Git Service

media: i2c: ov6650: Use new [get|set]_mbus_config ops
authorJacopo Mondi <jacopo+renesas@jmondi.org>
Tue, 21 Jul 2020 07:53:17 +0000 (09:53 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 18 Aug 2020 13:43:54 +0000 (15:43 +0200)
commit2d26e440984c39eb414581d693532010a3856664
tree1ce796e8eb94d9621c422486402b748ba67c8629
parent0c3da525b43d00a00ca945c58d0d64107685cd39
media: i2c: ov6650: Use new [get|set]_mbus_config ops

Use the new get_mbus_config and set_mbus_config pad operations in place
of the video operations currently in use.

Compared to other drivers where the same conversion has been performed,
ov6650 proved to be a bit more tricky, as the existing g_mbus_config
implementation did not report the currently applied configuration but
the set of all possible configuration options.

Adapt the driver to support the semantic of the two newly introduced
operations:
- get_mbus_config reports the current media bus configuration
- set_mbus_config applies only changes explicitly requested and updates
  the provided cfg parameter to report what has actually been applied to
  the hardware.

Compile-tested only.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov6650.c