]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: i2c: ov9282: add strobe_duration v4l2 control
authorRichard Leitner <richard.leitner@linux.dev>
Tue, 9 Dec 2025 22:44:41 +0000 (23:44 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 16 Jan 2026 13:08:53 +0000 (14:08 +0100)
commit84ec7597ae1afb9430c55044f318d1d40f8ecef0
tree2ec90da32918c3d14e1002310c20f90ac1e64506
parentf007ad65d7246d6b616541a3c7685ec688ca6beb
media: i2c: ov9282: add strobe_duration v4l2 control

Add V4L2_CID_FLASH_DURATION support using the "strobe_frame_span"
feature of the sensor. This is implemented by transforming the given µs
value by an interpolated formula to a "span step width" value and
writing it to register PWM_CTRL_25, PWM_CTRL_26, PWM_CTRL_27,
PWM_CTRL_28 (0x3925, 0x3926, 0x3927, 0x3928).

The maximum control value is set to the period of the current default
framerate.

All register values are based on the OV9281 datasheet v1.53 (jan 2019)
and tested using an ov9281 VisionComponents module.

Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
[Sakari Ailus: Remove redundant assignment of ret, declare ret as last.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/ov9282.c