From 1fc1905431f0154ff65d246c10519acafd145294 Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Wed, 8 Sep 2021 18:31:08 +0800 Subject: [PATCH] media: i2c: ov8858 fix compile error Signed-off-by: Zefa Chen Change-Id: I72c29e787a6ee82b7ade0e73ed462afeac301f34 --- drivers/media/i2c/Kconfig | 11 +++++++++++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov8858.c | 8 ++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index afe5982348bf..13bb5b9115ec 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -1336,6 +1336,17 @@ config VIDEO_OV8856 To compile this driver as a module, choose M here: the module will be called ov8856. +config VIDEO_OV8858 + tristate "OmniVision OV8858 sensor support" + depends on I2C && VIDEO_V4L2 + depends on MEDIA_CAMERA_SUPPORT + help + This is a Video4Linux2 sensor driver for the OmniVision + OV8858 camera. + + To compile this driver as a module, choose M here: the + module will be called ov8858. + config VIDEO_OV9640 tristate "OmniVision OV9640 sensor support" depends on I2C && VIDEO_V4L2 diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 67c343b82797..9b161bf73cb8 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -90,6 +90,7 @@ obj-$(CONFIG_VIDEO_OV7670) += ov7670.o obj-$(CONFIG_VIDEO_OV772X) += ov772x.o obj-$(CONFIG_VIDEO_OV7740) += ov7740.o obj-$(CONFIG_VIDEO_OV8856) += ov8856.o +obj-$(CONFIG_VIDEO_OV8858) += ov8858.o obj-$(CONFIG_VIDEO_OV9640) += ov9640.o obj-$(CONFIG_VIDEO_OV9650) += ov9650.o obj-$(CONFIG_VIDEO_OV13858) += ov13858.o diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c index a991c196aea7..d5c30955894a 100644 --- a/drivers/media/i2c/ov8858.c +++ b/drivers/media/i2c/ov8858.c @@ -2861,7 +2861,7 @@ static int ov8858_enum_frame_interval(struct v4l2_subdev *sd, return 0; } -static int ov8858_g_mbus_config(struct v4l2_subdev *sd, +static int ov8858_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, struct v4l2_mbus_config *config) { struct ov8858 *sensor = to_ov8858 (sd); @@ -2870,12 +2870,12 @@ static int ov8858_g_mbus_config(struct v4l2_subdev *sd, dev_info(dev, "%s(%d) enter!\n", __func__, __LINE__); if (2 == sensor->lane_num) { - config->type = V4L2_MBUS_CSI2; + config->type = V4L2_MBUS_CSI2_DPHY; config->flags = V4L2_MBUS_CSI2_2_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; } else if (4 == sensor->lane_num) { - config->type = V4L2_MBUS_CSI2; + config->type = V4L2_MBUS_CSI2_DPHY; config->flags = V4L2_MBUS_CSI2_4_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; @@ -2908,7 +2908,6 @@ static const struct v4l2_subdev_core_ops ov8858_core_ops = { static const struct v4l2_subdev_video_ops ov8858_video_ops = { .s_stream = ov8858_s_stream, .g_frame_interval = ov8858_g_frame_interval, - .g_mbus_config = ov8858_g_mbus_config, }; static const struct v4l2_subdev_pad_ops ov8858_pad_ops = { @@ -2917,6 +2916,7 @@ static const struct v4l2_subdev_pad_ops ov8858_pad_ops = { .enum_frame_interval = ov8858_enum_frame_interval, .get_fmt = ov8858_get_fmt, .set_fmt = ov8858_set_fmt, + .get_mbus_config = ov8858_g_mbus_config, }; static const struct v4l2_subdev_ops ov8858_subdev_ops = {