diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index d577f1f07d88..9418f53096d5 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -911,6 +911,17 @@ config VIDEO_IMX290 To compile this driver as a module, choose M here: the module will be called imx290. +config VIDEO_IMX307 + tristate "Sony IMX307 sensor support" + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + depends on MEDIA_CAMERA_SUPPORT + help + This is a Video4Linux2 sensor driver for the Sony + IMX307 camera. + + To compile this driver as a module, choose M here: the + module will be called imx307. + config VIDEO_IMX319 tristate "Sony IMX319 sensor support" depends on I2C && VIDEO_V4L2 diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index e78a183911ce..193f7bbd90e5 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -127,6 +127,7 @@ obj-$(CONFIG_VIDEO_IMX219) += imx219.o obj-$(CONFIG_VIDEO_IMX258) += imx258.o obj-$(CONFIG_VIDEO_IMX274) += imx274.o obj-$(CONFIG_VIDEO_IMX290) += imx290.o +obj-$(CONFIG_VIDEO_IMX307) += imx307.o obj-$(CONFIG_VIDEO_IMX319) += imx319.o obj-$(CONFIG_VIDEO_IMX355) += imx355.o obj-$(CONFIG_VIDEO_MAX9286) += max9286.o diff --git a/drivers/media/i2c/imx307.c b/drivers/media/i2c/imx307.c index ab07208cd6a2..54e6b869360e 100644 --- a/drivers/media/i2c/imx307.c +++ b/drivers/media/i2c/imx307.c @@ -1194,7 +1194,7 @@ static int imx307_g_frame_interval(struct v4l2_subdev *sd, return 0; } -static int imx307_g_mbus_config(struct v4l2_subdev *sd, +static int imx307_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id, struct v4l2_mbus_config *config) { struct imx307 *imx307 = to_imx307(sd); @@ -1206,7 +1206,7 @@ static int imx307_g_mbus_config(struct v4l2_subdev *sd, if (imx307->bus_cfg.bus_type == 3) config->type = V4L2_MBUS_CCP2; else - config->type = V4L2_MBUS_CSI2; + config->type = V4L2_MBUS_CSI2_DPHY; config->flags = val; return 0; @@ -1918,7 +1918,6 @@ static const struct v4l2_subdev_core_ops imx307_core_ops = { static const struct v4l2_subdev_video_ops imx307_video_ops = { .s_stream = imx307_s_stream, .g_frame_interval = imx307_g_frame_interval, - .g_mbus_config = imx307_g_mbus_config, }; static const struct v4l2_subdev_pad_ops imx307_pad_ops = { @@ -1928,6 +1927,7 @@ static const struct v4l2_subdev_pad_ops imx307_pad_ops = { .get_fmt = imx307_get_fmt, .set_fmt = imx307_set_fmt, .get_selection = imx307_get_selection, + .get_mbus_config = imx307_g_mbus_config, }; static const struct v4l2_subdev_ops imx307_subdev_ops = {