From e6cd868ed8f7065dfb36cc6382758976da8b6f0b Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Wed, 8 Sep 2021 18:38:23 +0800 Subject: [PATCH] media: i2c: ov13850 fix compile error Signed-off-by: Zefa Chen Change-Id: Id2c6b146f0c80bee2508ba1ef2f82ed4e250e218 --- drivers/media/i2c/Kconfig | 9 +++++++++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov13850.c | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index ebbc8d4f8748..9ae74ff7b22c 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -1384,6 +1384,15 @@ config VIDEO_OV12D2Q This is a Video4Linux2 sensor driver for the OmniVision OV12D2Q camera. +config VIDEO_OV13850 + tristate "OmniVision OV13850 sensor support" + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + depends on MEDIA_CAMERA_SUPPORT + select V4L2_FWNODE + help + This is a Video4Linux2 sensor driver for the OmniVision + OV13850 camera. + config VIDEO_OV13858 tristate "OmniVision OV13858 sensor support" depends on I2C && VIDEO_V4L2 diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 0d64bfb5b13b..c75999388f10 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -95,6 +95,7 @@ obj-$(CONFIG_VIDEO_OV9281) += ov9281.o obj-$(CONFIG_VIDEO_OV9640) += ov9640.o obj-$(CONFIG_VIDEO_OV9650) += ov9650.o obj-$(CONFIG_VIDEO_OV12D2Q) += ov12d2q.o +obj-$(CONFIG_VIDEO_OV13850) += ov13850.o obj-$(CONFIG_VIDEO_OV13858) += ov13858.o obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o diff --git a/drivers/media/i2c/ov13850.c b/drivers/media/i2c/ov13850.c index 49df05185b8b..8c5c8209e68b 100644 --- a/drivers/media/i2c/ov13850.c +++ b/drivers/media/i2c/ov13850.c @@ -1247,7 +1247,7 @@ static int ov13850_enum_frame_interval(struct v4l2_subdev *sd, return 0; } -static int ov13850_g_mbus_config(struct v4l2_subdev *sd, +static int ov13850_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, struct v4l2_mbus_config *config) { u32 val = 0; @@ -1255,7 +1255,7 @@ static int ov13850_g_mbus_config(struct v4l2_subdev *sd, val = 1 << (OV13850_LANES - 1) | V4L2_MBUS_CSI2_CHANNEL_0 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; - config->type = V4L2_MBUS_CSI2; + config->type = V4L2_MBUS_CSI2_DPHY; config->flags = val; return 0; @@ -1283,7 +1283,6 @@ static const struct v4l2_subdev_core_ops ov13850_core_ops = { static const struct v4l2_subdev_video_ops ov13850_video_ops = { .s_stream = ov13850_s_stream, .g_frame_interval = ov13850_g_frame_interval, - .g_mbus_config = ov13850_g_mbus_config, }; static const struct v4l2_subdev_pad_ops ov13850_pad_ops = { @@ -1292,6 +1291,7 @@ static const struct v4l2_subdev_pad_ops ov13850_pad_ops = { .enum_frame_interval = ov13850_enum_frame_interval, .get_fmt = ov13850_get_fmt, .set_fmt = ov13850_set_fmt, + .get_mbus_config = ov13850_g_mbus_config, }; static const struct v4l2_subdev_ops ov13850_subdev_ops = {