media: ov5647: Add basic support for multiple sensor modes.
authorDavid Plowman <david.plowman@raspberrypi.com>
Wed, 29 Jan 2020 15:30:53 +0000 (15:30 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 27 Jan 2021 19:13:09 +0000 (19:13 +0000)
commit12fef7be456bc2c39bbf0e8043ab7d3c14e8fd03
tree5c3e94bea9cbf1a9b1c32c3d7577cdfb44f89794
parent5c729f647548d2410e89ff3c86e99d99decd6c6a
media: ov5647: Add basic support for multiple sensor modes.

Specifically:

Added a structure ov5647_mode and a list of supported_modes (though no
actual new modes as yet). The state object points to the "current mode".

ov5647_enum_mbus_code, ov5647_enum_frame_size, ov5647_set_fmt and
ov5647_get_fmt all needed upgrading to cope with multiple modes.

__sensor_init (which writes all the registers) is now called by
ov5647_stream_on (once the mode is known) rather than by
ov5647_sensor_power.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/media/i2c/ov5647.c