MLK-17208-2: mipi sensor: Fill subdev_format reserved[0]
authorSandor Yu <Sandor.yu@nxp.com>
Thu, 14 Dec 2017 03:17:04 +0000 (11:17 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Pass mipi csi-2 output clock rate from mipi sensor to mipi csi-2
rx controller by v4l2_subdev_format.reserved[0].

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/media/platform/imx8/max9286.c

index 7696f85..123b972 100644 (file)
@@ -2868,6 +2868,12 @@ static int max9286_probe(struct i2c_client *client,
        max9286_data->format.width = g_max9286_width;
        max9286_data->format.height = g_max9286_height;
        max9286_data->format.colorspace = V4L2_COLORSPACE_JPEG;
+       /*****************************************
+        * Pass mipi phy clock rate Mbps
+        * fcsi2 = PCLk * WIDTH * CHANNELS / LANES
+        * fsci2 = 72MPCLK * 8 bit * 4 channels / 4 lanes
+        ****************************************/
+       max9286_data->format.reserved[0] = 72 * 8;
        max9286_data->format.field = V4L2_FIELD_NONE;
        max9286_data->streamcap.capturemode = 0;
        max9286_data->streamcap.timeperframe.denominator = 30;