From 49c227761a3012707e5da4df2faf01822ad4ddd6 Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Wed, 8 Sep 2021 17:59:27 +0800 Subject: [PATCH] media: i2c: os02g10 fix compile error Signed-off-by: Zefa Chen Change-Id: Iac097db4aa0c03409ba4c84cc9fa68e1abbb4d68 --- drivers/media/i2c/Kconfig | 9 +++++++++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/os02g10.c | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 468999823529..86a303331b17 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -1035,6 +1035,15 @@ config VIDEO_IMX355 To compile this driver as a module, choose M here: the module will be called imx355. +config VIDEO_OS02G10 + tristate "OmniVision OS02G10 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 + OS02G10 camera. + config VIDEO_OV2640 tristate "OmniVision OV2640 sensor support" depends on VIDEO_V4L2 && I2C diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 26c7cbb73ef3..656c0597b903 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -64,6 +64,7 @@ obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o +obj-$(CONFIG_VIDEO_OS02G10) += os02g10.o obj-$(CONFIG_VIDEO_OV2640) += ov2640.o obj-$(CONFIG_VIDEO_OV2680) += ov2680.o obj-$(CONFIG_VIDEO_OV2685) += ov2685.o diff --git a/drivers/media/i2c/os02g10.c b/drivers/media/i2c/os02g10.c index 60f7ba228951..5c9f8af494bf 100644 --- a/drivers/media/i2c/os02g10.c +++ b/drivers/media/i2c/os02g10.c @@ -540,7 +540,7 @@ static int os02g10_g_frame_interval(struct v4l2_subdev *sd, return 0; } -static int os02g10_g_mbus_config(struct v4l2_subdev *sd, +static int os02g10_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_mbus_config *config) { struct os02g10 *os02g10 = to_os02g10(sd); @@ -552,7 +552,7 @@ static int os02g10_g_mbus_config(struct v4l2_subdev *sd, 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; @@ -942,7 +942,6 @@ static const struct v4l2_subdev_core_ops os02g10_core_ops = { static const struct v4l2_subdev_video_ops os02g10_video_ops = { .s_stream = os02g10_s_stream, .g_frame_interval = os02g10_g_frame_interval, - .g_mbus_config = os02g10_g_mbus_config, }; static const struct v4l2_subdev_pad_ops os02g10_pad_ops = { @@ -951,6 +950,7 @@ static const struct v4l2_subdev_pad_ops os02g10_pad_ops = { .enum_frame_interval = os02g10_enum_frame_interval, .get_fmt = os02g10_get_fmt, .set_fmt = os02g10_set_fmt, + .get_mbus_config = os02g10_g_mbus_config, }; static const struct v4l2_subdev_ops os02g10_subdev_ops = {