MLK-22861: media: imx8: fix camera hang issue after system resume rel_imx_4.19.35_1.1.0
authorGuoniu.zhou <guoniu.zhou@nxp.com>
Wed, 30 Oct 2019 06:18:41 +0000 (14:18 +0800)
committerGuoniu.zhou <guoniu.zhou@nxp.com>
Wed, 30 Oct 2019 11:02:38 +0000 (19:02 +0800)
commit0f9917c56d5995e1dc3bde5658e2d7bc865464de
treed66ea5cae4897b4a9621cced1b54d5fad8c78b64
parent350c747d06a1025add8040befcf6f29aedc88b20
MLK-22861: media: imx8: fix camera hang issue after system resume

For imx8qxp/qm, gpio will go to low level when system suspend and
will to high when system resume. It will lead ov5640 sensor to reset.
So add reinitialization for sensor when system resume at first time.

For imx815, gpio will have no this issue because GPIO will keep high
when system suspend. So the patch is for fixing issue introduced by
MLK-22202-1. More info, please refer to the ticket.

OV5640 will work at DVP mode by default, but in our use case, it need
to work on MIPI mode, so we can know whether sensor is resetted by
system by checking 0x300E[2] bits.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
drivers/media/platform/imx8/ov5640_mipi_v3.c