media: i2c: ov5640: Enable data pins on poweron for DVP mode
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 4 Sep 2020 20:18:32 +0000 (22:18 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 10 Sep 2020 12:23:03 +0000 (14:23 +0200)
commit576f5d4ba8f672953513280510abf9a736b015cc
tree29868641c9ed461f7fdba23bc0af75c88d3b5048
parentb1751ae652fb95919c08df5bdd739ccf9886158a
media: i2c: ov5640: Enable data pins on poweron for DVP mode

During testing this sensor on iW-RainboW-G21D-Qseven platform in 8-bit DVP
mode with rcar-vin bridge noticed the capture worked fine for the first run
(with yavta), but for subsequent runs the bridge driver waited for the
frame to be captured. Debugging further noticed the data lines were
enabled/disabled in stream on/off callback and dumping the register
contents 0x3017/0x3018 in ov5640_set_stream_dvp() reported the correct
values, but yet frame capturing failed.

To get around this issue data lines are enabled in s_power callback.
(Also the sensor remains in power down mode if not streaming so power
consumption shouldn't be affected)

Fixes: f22996db44e2d ("media: ov5640: add support of DVP parallel interface")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov5640.c