Skip to content

Commit 84e98e3

Browse files
Zefa Chenpelwell
authored andcommitted
media: i2c: add ov9281 driver.
Change-Id: I7b77250bbc56d2f861450cf77271ad15f9b88ab1 Signed-off-by: Zefa Chen <[email protected]> media: i2c: ov9281: fix mclk issue when probe multiple camera. Takes the ov9281 part only from the Rockchip's patch. Change-Id: I30e833baf2c1bb07d6d87ddb3b00759ab45a90e4 Signed-off-by: Zefa Chen <[email protected]> media: i2c: ov9281: add enum_frame_interval function for iq tool 2.2 and hal3 Adds the ov9281 parts of the Rockchip patch adding enum_frame_interval to a large number of drivers. Change-Id: I03344cd6cf278dd7c18fce8e97479089ef185a5c Signed-off-by: Zefa Chen <[email protected]> media: i2c: ov9281: Fixup for recent kernel releases, and remove custom code The Rockchip driver was based on a 4.4 kernel, and had several custom Rockchip parts. Update to 5.4 kernel APIs, with the relevant controls required by libcamera, and remove custom Rockchip parts. Signed-off-by: Dave Stevenson <[email protected]> media: i2c: ov9281: Read chip ID via 2 reads Vision Components have made an OV9281 module which blocks reading back the majority of registers to comply with NDAs, and in doing so doesn't allow auto-increment register reading as used when reading the chip ID. Use two reads and manually combine the results. Signed-off-by: Dave Stevenson <[email protected]> media: i2c: ov9281: Add support for 8 bit readout The sensor supports 8 bit mode as well as 10bit, so add the relevant code to allow selection of this. Signed-off-by: Dave Stevenson <[email protected]> media: ov9281: Add 1280x720 and 640x480 modes Breaks out common register set and adds the different registers for 1280x720 (cropped) and 640x480 (skipped) modes Signed-off-by: Dave Stevenson <[email protected]> Fixed picture line bug in all ov9281 modes Signed-off-by: Mathias Anhalt <[email protected]> Added hflip and vflip controls to ov9281 Signed-off-by: Mathias Anhalt <[email protected]> media: i2c: ov9281: Remove override of subdev name From the original Rockchip driver, the subdev was renamed from the default to being "mov9281 <dev_name>" whereas the default would have been "ov9281 <dev_name>". Remove the override to drop back to the default rather than a vendor custom string. Signed-off-by: Dave Stevenson <[email protected]> media: v4l2-subdev: add subdev-wide state struct Signed-off-by: Dom Cobley <[email protected]> media: i2c: ov9281: Add fwnode properties controls Add call to v4l2_ctrl_new_fwnode_properties to read and create the fwnode based controls. Signed-off-by: Dave Stevenson <[email protected]> media: i2c: ov9281: Sensor should report RAW color space Tested on Raspberry Pi running libcamera. Signed-off-by: David Plowman <[email protected]>
1 parent efbac46 commit 84e98e3

File tree

8 files changed

+2086
-565
lines changed

8 files changed

+2086
-565
lines changed

drivers/media/i2c/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,17 @@ config VIDEO_TW2804
13901390
To compile this driver as a module, choose M here: the
13911391
module will be called tw2804.
13921392

1393+
config VIDEO_OV9281
1394+
tristate "OmniVision OV9281 sensor support"
1395+
depends on I2C && VIDEO_DEV
1396+
depends on MEDIA_CAMERA_SUPPORT
1397+
help
1398+
This is a Video4Linux2 sensor-level driver for the OmniVision
1399+
OV9281 camera.
1400+
1401+
To compile this driver as a module, choose M here: the
1402+
module will be called ov9281.
1403+
13931404
config VIDEO_TW9903
13941405
tristate "Techwell TW9903 video decoder"
13951406
depends on VIDEO_DEV && I2C

drivers/media/i2c/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ obj-$(CONFIG_VIDEO_OV772X) += ov772x.o
101101
obj-$(CONFIG_VIDEO_OV7740) += ov7740.o
102102
obj-$(CONFIG_VIDEO_OV8856) += ov8856.o
103103
obj-$(CONFIG_VIDEO_OV8865) += ov8865.o
104+
obj-$(CONFIG_VIDEO_OV9281) += ov9281.o
104105
obj-$(CONFIG_VIDEO_OV9282) += ov9282.o
105106
obj-$(CONFIG_VIDEO_OV9640) += ov9640.o
106107
obj-$(CONFIG_VIDEO_OV9650) += ov9650.o

0 commit comments

Comments
 (0)