.. | .. |
---|
902 | 902 | struct ov13850 *ov13850 = to_ov13850(sd); |
---|
903 | 903 | const struct ov13850_mode *mode = ov13850->cur_mode; |
---|
904 | 904 | |
---|
905 | | - mutex_lock(&ov13850->mutex); |
---|
906 | 905 | fi->interval = mode->max_fps; |
---|
907 | | - mutex_unlock(&ov13850->mutex); |
---|
908 | 906 | |
---|
909 | 907 | return 0; |
---|
910 | 908 | } |
---|
.. | .. |
---|
1189 | 1187 | regulator_bulk_disable(OV13850_NUM_SUPPLIES, ov13850->supplies); |
---|
1190 | 1188 | } |
---|
1191 | 1189 | |
---|
1192 | | -static int ov13850_runtime_resume(struct device *dev) |
---|
| 1190 | +static int __maybe_unused ov13850_runtime_resume(struct device *dev) |
---|
1193 | 1191 | { |
---|
1194 | 1192 | struct i2c_client *client = to_i2c_client(dev); |
---|
1195 | 1193 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
1198 | 1196 | return __ov13850_power_on(ov13850); |
---|
1199 | 1197 | } |
---|
1200 | 1198 | |
---|
1201 | | -static int ov13850_runtime_suspend(struct device *dev) |
---|
| 1199 | +static int __maybe_unused ov13850_runtime_suspend(struct device *dev) |
---|
1202 | 1200 | { |
---|
1203 | 1201 | struct i2c_client *client = to_i2c_client(dev); |
---|
1204 | 1202 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
---|
.. | .. |
---|
1238 | 1236 | if (fie->index >= ARRAY_SIZE(supported_modes)) |
---|
1239 | 1237 | return -EINVAL; |
---|
1240 | 1238 | |
---|
1241 | | - if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10) |
---|
1242 | | - return -EINVAL; |
---|
1243 | | - |
---|
| 1239 | + fie->code = MEDIA_BUS_FMT_SBGGR10_1X10; |
---|
1244 | 1240 | fie->width = supported_modes[fie->index].width; |
---|
1245 | 1241 | fie->height = supported_modes[fie->index].height; |
---|
1246 | 1242 | fie->interval = supported_modes[fie->index].max_fps; |
---|
1247 | 1243 | return 0; |
---|
1248 | 1244 | } |
---|
1249 | 1245 | |
---|
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, |
---|
1251 | 1247 | struct v4l2_mbus_config *config) |
---|
1252 | 1248 | { |
---|
1253 | 1249 | u32 val = 0; |
---|
.. | .. |
---|
1255 | 1251 | val = 1 << (OV13850_LANES - 1) | |
---|
1256 | 1252 | V4L2_MBUS_CSI2_CHANNEL_0 | |
---|
1257 | 1253 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
---|
1258 | | - config->type = V4L2_MBUS_CSI2; |
---|
| 1254 | + config->type = V4L2_MBUS_CSI2_DPHY; |
---|
1259 | 1255 | config->flags = val; |
---|
1260 | 1256 | |
---|
1261 | 1257 | return 0; |
---|
.. | .. |
---|
1283 | 1279 | static const struct v4l2_subdev_video_ops ov13850_video_ops = { |
---|
1284 | 1280 | .s_stream = ov13850_s_stream, |
---|
1285 | 1281 | .g_frame_interval = ov13850_g_frame_interval, |
---|
1286 | | - .g_mbus_config = ov13850_g_mbus_config, |
---|
1287 | 1282 | }; |
---|
1288 | 1283 | |
---|
1289 | 1284 | static const struct v4l2_subdev_pad_ops ov13850_pad_ops = { |
---|
.. | .. |
---|
1292 | 1287 | .enum_frame_interval = ov13850_enum_frame_interval, |
---|
1293 | 1288 | .get_fmt = ov13850_get_fmt, |
---|
1294 | 1289 | .set_fmt = ov13850_set_fmt, |
---|
| 1290 | + .get_mbus_config = ov13850_g_mbus_config, |
---|
1295 | 1291 | }; |
---|
1296 | 1292 | |
---|
1297 | 1293 | static const struct v4l2_subdev_ops ov13850_subdev_ops = { |
---|