forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/i2c/ov4689.c
....@@ -106,14 +106,6 @@
106106
107107 #define OV4689_NUM_SUPPLIES ARRAY_SIZE(ov4689_supply_names)
108108
109
-enum ov4689_max_pad {
110
- PAD0, /* link to isp */
111
- PAD1, /* link to csi wr0 | hdr x2:L x3:M */
112
- PAD2, /* link to csi wr1 | hdr x3:L */
113
- PAD3, /* link to csi wr2 | hdr x2:M x3:S */
114
- PAD_MAX,
115
-};
116
-
117109 struct regval {
118110 u16 addr;
119111 u8 val;
....@@ -763,14 +755,12 @@
763755 struct ov4689 *ov4689 = to_ov4689(sd);
764756 const struct ov4689_mode *mode = ov4689->cur_mode;
765757
766
- mutex_lock(&ov4689->mutex);
767758 fi->interval = mode->max_fps;
768
- mutex_unlock(&ov4689->mutex);
769759
770760 return 0;
771761 }
772762
773
-static int ov4689_g_mbus_config(struct v4l2_subdev *sd,
763
+static int ov4689_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
774764 struct v4l2_mbus_config *config)
775765 {
776766 struct ov4689 *ov4689 = to_ov4689(sd);
....@@ -784,7 +774,7 @@
784774 if (mode->hdr_mode == HDR_X3)
785775 val |= V4L2_MBUS_CSI2_CHANNEL_2;
786776
787
- config->type = V4L2_MBUS_CSI2;
777
+ config->type = V4L2_MBUS_CSI2_DPHY;
788778 config->flags = val;
789779
790780 return 0;
....@@ -1292,7 +1282,6 @@
12921282 static const struct v4l2_subdev_video_ops ov4689_video_ops = {
12931283 .s_stream = ov4689_s_stream,
12941284 .g_frame_interval = ov4689_g_frame_interval,
1295
- .g_mbus_config = ov4689_g_mbus_config,
12961285 };
12971286
12981287 static const struct v4l2_subdev_pad_ops ov4689_pad_ops = {
....@@ -1301,6 +1290,7 @@
13011290 .enum_frame_interval = ov4689_enum_frame_interval,
13021291 .get_fmt = ov4689_get_fmt,
13031292 .set_fmt = ov4689_set_fmt,
1293
+ .get_mbus_config = ov4689_g_mbus_config,
13041294 };
13051295
13061296 static const struct v4l2_subdev_ops ov4689_subdev_ops = {