hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/i2c/gc5025.c
....@@ -544,9 +544,7 @@
544544 struct gc5025 *gc5025 = to_gc5025(sd);
545545 const struct gc5025_mode *mode = gc5025->cur_mode;
546546
547
- mutex_lock(&gc5025->mutex);
548547 fi->interval = mode->max_fps;
549
- mutex_unlock(&gc5025->mutex);
550548
551549 return 0;
552550 }
....@@ -1502,16 +1500,14 @@
15021500 if (fie->index >= ARRAY_SIZE(supported_modes))
15031501 return -EINVAL;
15041502
1505
- if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
1506
- return -EINVAL;
1507
-
1503
+ fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
15081504 fie->width = supported_modes[fie->index].width;
15091505 fie->height = supported_modes[fie->index].height;
15101506 fie->interval = supported_modes[fie->index].max_fps;
15111507 return 0;
15121508 }
15131509
1514
-static int gc5025_g_mbus_config(struct v4l2_subdev *sd,
1510
+static int gc5025_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
15151511 struct v4l2_mbus_config *config)
15161512 {
15171513 u32 val = 0;
....@@ -1520,7 +1516,7 @@
15201516 V4L2_MBUS_CSI2_CHANNEL_0 |
15211517 V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
15221518
1523
- config->type = V4L2_MBUS_CSI2;
1519
+ config->type = V4L2_MBUS_CSI2_DPHY;
15241520 config->flags = val;
15251521
15261522 return 0;
....@@ -1563,7 +1559,6 @@
15631559 static const struct v4l2_subdev_video_ops gc5025_video_ops = {
15641560 .s_stream = gc5025_s_stream,
15651561 .g_frame_interval = gc5025_g_frame_interval,
1566
- .g_mbus_config = gc5025_g_mbus_config,
15671562 };
15681563
15691564 static const struct v4l2_subdev_pad_ops gc5025_pad_ops = {
....@@ -1573,6 +1568,7 @@
15731568 .get_fmt = gc5025_get_fmt,
15741569 .set_fmt = gc5025_set_fmt,
15751570 .get_selection = gc5025_get_selection,
1571
+ .get_mbus_config = gc5025_g_mbus_config,
15761572 };
15771573
15781574 static const struct v4l2_subdev_ops gc5025_subdev_ops = {