ov5675: Add support for OV5675 sensor
PATCH v2 1/1 ov5675: Add support for OV5675 sensor
From: Shawn Tu <[email protected]>
Add a V4L2 sub-device driver for Omnivision ov5675 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data.
This driver supports following features:
- manual exposure and analog/digital gain control support
- vblank/hblank control support
- test pattern support
- media controller support
- runtime PM support
- support following resolutions:
+ 2592x1944 at 30FPS
+ 1296x972 at 30FPS
--- MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 13 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5675.c | 1181 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1202 insertions(+) create mode 100644 drivers/media/i2c/ov5675.c
MAINTAINERS +7 -0
@@ -11845,6 +11845,13 @@ T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/i2c/ov5647.c +OMNIVISION OV5675 SENSOR DRIVER +M: Shawn Tu <[email protected]> +L: [email protected] +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/ov5675.c + OMNIVISION OV5695 SENSOR DRIVER M: Shunqian Zheng <[email protected]> L: [email protected]
drivers/media/i2c/Kconfig +13 -0
@@ -723,6 +723,19 @@ config VIDEO_OV5670 To compile this driver as a module, choose M here: the module will be called ov5670. +config VIDEO_OV5675 + tristate "OmniVision OV5675 sensor support" + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER + select V4L2_FWNODE + help + This is a Video4Linux2 sensor driver for the OmniVision + OV5675 camera. + + To compile this driver as a module, choose M here: the + module will be called ov5675. + config VIDEO_OV5695 tristate "OmniVision OV5695 sensor support" depends on I2C && VIDEO_V4L2
drivers/media/i2c/Makefile +1 -0
@@ -70,6 +70,7 @@ obj-$(CONFIG_VIDEO_OV5640) += ov5640.o obj-$(CONFIG_VIDEO_OV5645) += ov5645.o obj-$(CONFIG_VIDEO_OV5647) += ov5647.o obj-$(CONFIG_VIDEO_OV5670) += ov5670.o +obj-$(CONFIG_VIDEO_OV5675) += ov5675.o obj-$(CONFIG_VIDEO_OV5695) += ov5695.o obj-$(CONFIG_VIDEO_OV6650) += ov6650.o obj-$(CONFIG_VIDEO_OV7251) += ov7251.o
drivers/media/i2c/ov5675.c new file +1181 -0
1,181 lines not on this page · raw message
Signature · 1 line
2.7.4
Hi Shawn,
Quoted 16 lines · Shawnx Tu
From: Shawn Tu <[email protected]>
Add a V4L2 sub-device driver for Omnivision ov5675 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data.
This driver supports following features:
- manual exposure and analog/digital gain control support
- vblank/hblank control support
- test pattern support
- media controller support
- runtime PM support
- support following resolutions:
+ 2592x1944 at 30FPS
+ 1296x972 at 30FPS
Quoted 1 line
Signed-off-by Shawn Tu <[email protected]>
Applied, with the following diff (was over 80 characters per line):
drivers/media/i2c/ov5675.c +4 -2
@@ -646,7 +646,8 @@ static int ov5675_set_ctrl(struct v4l2_ctrl *ctrl)case V4L2_CID_VBLANK : ret =ov5675_write_reg (ov5675,OV5675_REG_VTS ,OV5675_REG_VALUE_16BIT , - ov5675->cur_mode->height + ctrl->val +10 ); + ov5675->cur_mode->height + ctrl->val + +10 );break ;case V4L2_CID_TEST_PATTERN :
@@ -710,7 +711,8 @@ static int ov5675_init_controls(struct ov5675 *ov5675)v4l2_ctrl_new_std (ctrl_hdlr, &ov5675_ctrl_ops,V4L2_CID_DIGITAL_GAIN ,OV5675_DGTL_GAIN_MIN ,OV5675_DGTL_GAIN_MAX ,OV5675_DGTL_GAIN_STEP ,OV5675_DGTL_GAIN_DEFAULT ); - exposure_max = (ov5675->cur_mode->vts_def -OV5675_EXPOSURE_MAX_MARGIN )/2 ; + exposure_max = (ov5675->cur_mode->vts_def - +OV5675_EXPOSURE_MAX_MARGIN ) /2 ; ov5675->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &ov5675_ctrl_ops, V4L2_CID_EXPOSURE, OV5675_EXPOSURE_MIN, exposure_max,
Signature · 2 lines
Sakari Ailus [email protected]