media: imx258: Add imx258 camera sensor driver
PATCH v3 1/1 media: imx258: Add imx258 camera sensor driver
Add a V4L2 sub-device driver for the Sony IMX258 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data.
---
- Update the streaming function to remove SW_STANDBY in the beginning.
- Adjust the delay time from 1ms to 12ms before set stream-on register.
- make clear and fix typo in comments.
MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/imx258.c | 1148 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1167 insertions(+) create mode 100644 drivers/media/i2c/imx258.c
MAINTAINERS +7 -0
@@ -12640,6 +12640,13 @@ S: Maintained F: drivers/ssb/ F: include/linux/ssb/ +SONY IMX258 SENSOR DRIVER +M: Sakari Ailus <[email protected]> +L: [email protected] +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/imx258.c + SONY IMX274 SENSOR DRIVER M: Leon Luo <[email protected]> L: [email protected]
drivers/media/i2c/Kconfig +11 -0
@@ -555,6 +555,17 @@ config VIDEO_APTINA_PLL config VIDEO_SMIAPP_PLL tristate +config VIDEO_IMX258 + tristate "Sony IMX258 sensor support" + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + depends on MEDIA_CAMERA_SUPPORT + ---help--- + This is a Video4Linux2 sensor-level driver for the Sony + IMX258 camera. + + To compile this driver as a module, choose M here: the + module will be called imx258. + config VIDEO_IMX274 tristate "Sony IMX274 sensor support" depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
drivers/media/i2c/Makefile +1 -0
@@ -93,6 +93,7 @@ obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_OV2659) += ov2659.o obj-$(CONFIG_VIDEO_TC358743) += tc358743.o +obj-$(CONFIG_VIDEO_IMX258) += imx258.o obj-$(CONFIG_VIDEO_IMX274) += imx274.o obj-$(CONFIG_SDR_MAX2175) += max2175.o
drivers/media/i2c/imx258.c new file +1148 -0
1,148 lines not on this page · raw message
Signature · 1 line
2.7.4
Sakari Ailus
maintainerHi Andy,
Quoted 6 lines · Andy Yeh
Add a V4L2 sub-device driver for the Sony IMX258 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data.
Signed-off-by Andy Yeh <[email protected]>---
Please specify in the future which version the differences are from.
Quoted 3 lines
- Update the streaming function to remove
SW_STANDBYin the beginning.
- Adjust the delay time from 1ms to 12ms before set stream-on register.
- make clear and fix typo in comments.
I'll apply the patch with the following diff. It wouldn't otherwise compile on the mainline kernel:
drivers/media/i2c/imx258.c +1 -1
@@ -1071,7 +1071,7 @@ static int imx258_probe(struct i2c_client *client)/* Initialize subdev */ imx258->sd.internal_ops = &imx258_internal_ops; imx258->sd.flags |=V4L2_SUBDEV_FL_HAS_DEVNODE ; - imx258->sd.entity.type =MEDIA_ENT_T_V4L2_SUBDEV_SENSOR ; + imx258->sd.entity.function =MEDIA_ENT_F_CAM_SENSOR ;/* Initialize source pad */ imx258->pad.flags =MEDIA_PAD_FL_SOURCE ;
Signature · 4 lines
Regards, Sakari Ailus [email protected]