media: i2c: Add Omnivision OV02C10 sensor driver
PATCH v5 1/1 media: i2c: Add Omnivision OV02C10 sensor driver
Add a new driver for the Omnivision OV02C10 camera sensor. This is based on the out of tree driver by Hao Yao <[email protected]> from:
https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov02c10.c
This has been tested on a Dell XPS 9440 together with the IPU6 isys CSI driver and the libcamera software ISP code.
--- drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov02c10.c | 1338 +++++++++++++++++++++++++++++++++++ 3 files changed, 1349 insertions(+) create mode 100644 drivers/media/i2c/ov02c10.c
drivers/media/i2c/Kconfig +10 -0
@@ -355,6 +355,16 @@ config VIDEO_OV02A10 To compile this driver as a module, choose M here: the module will be called ov02a10. +config VIDEO_OV02C10 + tristate "OmniVision OV02C10 sensor support" + select V4L2_CCI_I2C + help + This is a Video4Linux2 sensor driver for the OmniVision + OV02C10 camera. + + To compile this driver as a module, choose M here: the + module will be called ov02c10. + config VIDEO_OV08D10 tristate "OmniVision OV08D10 sensor support" help
drivers/media/i2c/Makefile +1 -0
@@ -82,6 +82,7 @@ obj-$(CONFIG_VIDEO_MT9V111) += mt9v111.o obj-$(CONFIG_VIDEO_OG01A1B) += og01a1b.o obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o obj-$(CONFIG_VIDEO_OV02A10) += ov02a10.o +obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o obj-$(CONFIG_VIDEO_OV08D10) += ov08d10.o obj-$(CONFIG_VIDEO_OV08X40) += ov08x40.o obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
drivers/media/i2c/ov02c10.c new file +1338 -0
1,338 lines not on this page · raw message
Signature · 1 line
2.47.0
Hello Heimir,
Review
Quoted 8 lines
(quoted diff) +8
-0+enum { + OV02C10_LINK_FREQ_400MHZ_INDEX, +}; + +struct ov02c10_link_freq_config { + const struct reg_sequence *reg_sequence; + const int sequence_length; +};
now its unused you can remove
Quoted 7 lines
(quoted diff) +7
-0+static int ov02c10_set_format(struct v4l2_subdev *sd, + struct v4l2_subdev_state *sd_state, + struct v4l2_subdev_format *fmt) +{ + struct ov02c10 *ov02c10 = to_ov02c10(sd); + const struct ov02c10_mode *mode; + s32 vblank_def, h_blank;
Review
Quoted 10 lines
(quoted diff) +10
-0+ + if (ov02c10->mipi_lanes == 1) + mode = &supported_modes[0]; + else if (ov02c10->mipi_lanes == 2) + mode = &supported_modes[1]; + else + mode = v4l2_find_nearest_size(supported_modes, + ARRAY_SIZE(supported_modes), + width, height, fmt->format.width, + fmt->format.height);
The else part does not seem helpful to me.
There is no need to send the next version for now. Please wait for the maintainers comments.
Best regards,
Tarang
________________________________________
From: Heimir Thor Sverrisson <[email protected]>
Sent: Wednesday, November 20, 2024 7:27 AM
To: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Heimir Thor Sverrisson <[email protected]> Subject: [PATCH v5] media: i2c: Add Omnivision OV02C10 sensor driver
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Add a new driver for the Omnivision OV02C10 camera sensor. This is based on the out of tree driver by Hao Yao <[email protected]> from:
https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov02c10.c
This has been tested on a Dell XPS 9440 together with the IPU6 isys CSI driver and the libcamera software ISP code.
---
drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov02c10.c | 1338 +++++++++++++++++++++++++++++++++++
3 files changed, 1349 insertions(+)
create mode 100644 drivers/media/i2c/ov02c10.c
drivers/media/i2c/Kconfig +0 -0
@@ -355,6 +355,16 @@ config VIDEO_OV02A10
To compile this driver as a module, choose M here: the module will be called ov02a10.
+config VIDEO_OV02C10
+ tristate "OmniVision OV02C10 sensor support"
+ select V4L2_CCI_I2C
+ help
+ This is a Video4Linux2 sensor driver for the OmniVision + OV02C10 camera.
+
+ To compile this driver as a module, choose M here: the + module will be called ov02c10.
+
config VIDEO_OV08D10
tristate "OmniVision OV08D10 sensor support" help
drivers/media/i2c/Makefile +0 -0
@@ -82,6 +82,7 @@ obj-$(CONFIG_VIDEO_MT9V111) += mt9v111.o
obj-$(CONFIG_VIDEO_OG01A1B) += og01a1b.o
obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o
obj-$(CONFIG_VIDEO_OV02A10) += ov02a10.o
+obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o
obj-$(CONFIG_VIDEO_OV08D10) += ov08d10.o
obj-$(CONFIG_VIDEO_OV08X40) += ov08x40.o
obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
drivers/media/i2c/ov02c10.c new file +1338 -0
1,338 lines not on this page · raw message
--
2.47.0