From 68724d4d7bc17403f952ed809aaa236d24d7c045 Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Wed, 8 Sep 2021 18:23:46 +0800 Subject: [PATCH] media: i2c: ov4686 fix compile error Signed-off-by: Zefa Chen Change-Id: I809a81e719587a0e81ae87e752dfab59300fb7ce --- drivers/media/i2c/Kconfig | 12 ++++++++++++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov4686.c | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 0a52d9027905..3bc4f876124f 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -1151,6 +1151,18 @@ config VIDEO_OV2740 To compile this driver as a module, choose M here: the module will be called ov2740. +config VIDEO_OV4686 + tristate "OmniVision OV4686 sensor support" + depends on VIDEO_V4L2 && I2C && MEDIA_CONTROLLER + depends on MEDIA_CAMERA_SUPPORT + select V4L2_FWNODE + help + This is a Video4Linux2 sensor driver for the OmniVision + OV4686 camera. + + To compile this driver as a module, choose M here: the + module will be called ov4686. + config VIDEO_OV5640 tristate "OmniVision OV5640 sensor support" depends on OF diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index d5f5c1682aae..77c69dc3dff5 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_VIDEO_OV2680) += ov2680.o obj-$(CONFIG_VIDEO_OV2685) += ov2685.o obj-$(CONFIG_VIDEO_OV2718) += ov2718.o obj-$(CONFIG_VIDEO_OV2740) += ov2740.o +obj-$(CONFIG_VIDEO_OV4686) += ov4686.o obj-$(CONFIG_VIDEO_OV5640) += ov5640.o obj-$(CONFIG_VIDEO_OV5645) += ov5645.o obj-$(CONFIG_VIDEO_OV5647) += ov5647.o diff --git a/drivers/media/i2c/ov4686.c b/drivers/media/i2c/ov4686.c index cb14ec9adb89..3658e37722e5 100644 --- a/drivers/media/i2c/ov4686.c +++ b/drivers/media/i2c/ov4686.c @@ -733,7 +733,7 @@ static int OV4686_g_frame_interval(struct v4l2_subdev *sd, return 0; } -static int OV4686_g_mbus_config(struct v4l2_subdev *sd, +static int OV4686_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, struct v4l2_mbus_config *config) { struct OV4686 *OV4686 = to_OV4686(sd); @@ -747,7 +747,7 @@ static int OV4686_g_mbus_config(struct v4l2_subdev *sd, if (mode->hdr_mode == HDR_X3) val |= V4L2_MBUS_CSI2_CHANNEL_2; - config->type = V4L2_MBUS_CSI2; + config->type = V4L2_MBUS_CSI2_DPHY; config->flags = val; return 0; @@ -1237,7 +1237,6 @@ static const struct v4l2_subdev_core_ops OV4686_core_ops = { static const struct v4l2_subdev_video_ops OV4686_video_ops = { .s_stream = OV4686_s_stream, .g_frame_interval = OV4686_g_frame_interval, - .g_mbus_config = OV4686_g_mbus_config, }; static const struct v4l2_subdev_pad_ops OV4686_pad_ops = { @@ -1246,6 +1245,7 @@ static const struct v4l2_subdev_pad_ops OV4686_pad_ops = { .enum_frame_interval = OV4686_enum_frame_interval, .get_fmt = OV4686_get_fmt, .set_fmt = OV4686_set_fmt, + .get_mbus_config = OV4686_g_mbus_config, }; static const struct v4l2_subdev_ops OV4686_subdev_ops = {