MLK-20123-1: camera: add automatic selection mode for mipi ov5640
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Tue, 30 Oct 2018 06:58:48 +0000 (14:58 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit30902a052277cce4601eef4c2e39bcec37e22053
treec83ad603682edc16552de27ca29fd93056ce4424
parentb70b4c3e4c5cf4ba2877e97fa393ad40b522e8d1
MLK-20123-1: camera: add automatic selection mode for mipi ov5640

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for mipi interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)
drivers/media/platform/imx8/ov5640_mipi_v3.c