Add support for v4l2_subdev_sensor_ops.g_skip_frames. Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- drivers/media/i2c/ov2680.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c index 867df602ee53..9e4f0bcbe979 100644 --- a/drivers/media/i2c/ov2680.c +++ b/drivers/media/i2c/ov2680.c @@ -62,6 +62,8 @@ #define OV2680_FRAME_RATE 30 +#define OV2680_SKIP_FRAMES 3 + #define OV2680_NATIVE_WIDTH 1616 #define OV2680_NATIVE_HEIGHT 1216 #define OV2680_NATIVE_START_LEFT 0 @@ -759,6 +761,12 @@ static int ov2680_enum_frame_interval(struct v4l2_subdev *sd, return 0; } +static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames) +{ + *frames = OV2680_SKIP_FRAMES; + return 0; +} + static int ov2680_s_ctrl(struct v4l2_ctrl *ctrl) { struct v4l2_subdev *sd = ctrl_to_sd(ctrl); @@ -806,6 +814,10 @@ static const struct v4l2_subdev_video_ops ov2680_video_ops = { .s_stream = ov2680_s_stream, }; +static const struct v4l2_subdev_sensor_ops ov2680_sensor_ops = { + .g_skip_frames = ov2680_g_skip_frames, +}; + static const struct v4l2_subdev_pad_ops ov2680_pad_ops = { .init_cfg = ov2680_init_cfg, .enum_mbus_code = ov2680_enum_mbus_code, @@ -820,6 +832,7 @@ static const struct v4l2_subdev_pad_ops ov2680_pad_ops = { static const struct v4l2_subdev_ops ov2680_subdev_ops = { .video = &ov2680_video_ops, .pad = &ov2680_pad_ops, + .sensor = &ov2680_sensor_ops, }; static int ov2680_mode_init(struct ov2680_dev *sensor) -- 2.40.1