hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/i2c/ov13850.c
....@@ -902,9 +902,7 @@
902902 struct ov13850 *ov13850 = to_ov13850(sd);
903903 const struct ov13850_mode *mode = ov13850->cur_mode;
904904
905
- mutex_lock(&ov13850->mutex);
906905 fi->interval = mode->max_fps;
907
- mutex_unlock(&ov13850->mutex);
908906
909907 return 0;
910908 }
....@@ -1189,7 +1187,7 @@
11891187 regulator_bulk_disable(OV13850_NUM_SUPPLIES, ov13850->supplies);
11901188 }
11911189
1192
-static int ov13850_runtime_resume(struct device *dev)
1190
+static int __maybe_unused ov13850_runtime_resume(struct device *dev)
11931191 {
11941192 struct i2c_client *client = to_i2c_client(dev);
11951193 struct v4l2_subdev *sd = i2c_get_clientdata(client);
....@@ -1198,7 +1196,7 @@
11981196 return __ov13850_power_on(ov13850);
11991197 }
12001198
1201
-static int ov13850_runtime_suspend(struct device *dev)
1199
+static int __maybe_unused ov13850_runtime_suspend(struct device *dev)
12021200 {
12031201 struct i2c_client *client = to_i2c_client(dev);
12041202 struct v4l2_subdev *sd = i2c_get_clientdata(client);
....@@ -1238,16 +1236,14 @@
12381236 if (fie->index >= ARRAY_SIZE(supported_modes))
12391237 return -EINVAL;
12401238
1241
- if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
1242
- return -EINVAL;
1243
-
1239
+ fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
12441240 fie->width = supported_modes[fie->index].width;
12451241 fie->height = supported_modes[fie->index].height;
12461242 fie->interval = supported_modes[fie->index].max_fps;
12471243 return 0;
12481244 }
12491245
1250
-static int ov13850_g_mbus_config(struct v4l2_subdev *sd,
1246
+static int ov13850_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
12511247 struct v4l2_mbus_config *config)
12521248 {
12531249 u32 val = 0;
....@@ -1255,7 +1251,7 @@
12551251 val = 1 << (OV13850_LANES - 1) |
12561252 V4L2_MBUS_CSI2_CHANNEL_0 |
12571253 V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
1258
- config->type = V4L2_MBUS_CSI2;
1254
+ config->type = V4L2_MBUS_CSI2_DPHY;
12591255 config->flags = val;
12601256
12611257 return 0;
....@@ -1283,7 +1279,6 @@
12831279 static const struct v4l2_subdev_video_ops ov13850_video_ops = {
12841280 .s_stream = ov13850_s_stream,
12851281 .g_frame_interval = ov13850_g_frame_interval,
1286
- .g_mbus_config = ov13850_g_mbus_config,
12871282 };
12881283
12891284 static const struct v4l2_subdev_pad_ops ov13850_pad_ops = {
....@@ -1292,6 +1287,7 @@
12921287 .enum_frame_interval = ov13850_enum_frame_interval,
12931288 .get_fmt = ov13850_get_fmt,
12941289 .set_fmt = ov13850_set_fmt,
1290
+ .get_mbus_config = ov13850_g_mbus_config,
12951291 };
12961292
12971293 static const struct v4l2_subdev_ops ov13850_subdev_ops = {