MLK-20595-1: camera: fix camera hang issue after resume
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Fri, 14 Dec 2018 10:08:25 +0000 (18:08 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
The reset pin of ov5640 will power down when system suspend and
it will lead to reset ov5640, so driver need to reinitialize the
sensor before streaming

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

index e1197e7..82ef3e2 100644 (file)
@@ -1036,6 +1036,7 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd,
        if (format->which == V4L2_SUBDEV_FORMAT_TRY)
                return 0;
 
+       init_device(sensor);
        ret = ov5640_change_mode(sensor);
        sensor->fmt = fmt;