public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add strobe/flash duration v4l2 ctrl & use it for ov9282
@ 2025-03-14  8:49 Richard Leitner
  2025-03-14  8:49 ` [PATCH v2 1/8] media: v4l: ctrls: add a control for flash/strobe duration Richard Leitner
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Richard Leitner @ 2025-03-14  8:49 UTC (permalink / raw)
  To: Sakari Ailus, Dave Stevenson, Mauro Carvalho Chehab, Lee Jones,
	Pavel Machek, Laurent Pinchart
  Cc: linux-media, linux-kernel, linux-leds, Richard Leitner

This series adds a new v4l2 controls named "strobe duration" with id
V4L2_CID_FLASH_DURATION. This control enables setting a desired
flash/strobe length/duration in µs.

As a first user of this new control add basic flash/strobe support for
ov9282 sensors using their "hardware strobe output". The duration
calculation is only interpolated from various measurements, as no
documentation was found.

Further flash/strobe-related controls as well as a migration to v4l2-cci
helpers for ov9282 will likely be implemented in future series.

All register addresses/values are based on the OV9281 datasheet v1.53
(january 2019). This series was tested using an ov9281 VisionComponents
camera module.

Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
---
Changes in v2:
- remove not needed controls in struct ov9282 (thanks Dave)
- Fix commit message of 3/3 regarding framerate get/set (thanks Dave)
- Add V4L2_CID_FLASH_STROBE_SOURCE impementation to ov9282
- Add new V4L2_CID_FLASH_DURATION control (as suggested by Laurent)
- Use FLASH_DURATION instead of FLASH_TIMEOUT for ov9282
- Link to v1: https://lore.kernel.org/r/20250303-ov9282-flash-strobe-v1-0-0fd57a1564ba@linux.dev

---
Richard Leitner (8):
      media: v4l: ctrls: add a control for flash/strobe duration
      media: v4l2-flash: add support for flash/stobe duration
      media: v4l2-flash: fix flash_timeout comment
      Documentation: uAPI: media: add V4L2_CID_FLASH_DURATION
      media: i2c: ov9282: add output enable register definitions
      media: i2c: ov9282: add led_mode v4l2 control
      media: i2c: ov9282: add strobe_duration v4l2 control
      media: i2c: ov9282: add strobe_source v4l2 control

 .../userspace-api/media/v4l/ext-ctrls-flash.rst    |  5 ++
 drivers/leds/led-class-flash.c                     | 15 ++++
 drivers/media/i2c/ov9282.c                         | 92 +++++++++++++++++++++-
 drivers/media/v4l2-core/v4l2-ctrls-defs.c          |  1 +
 drivers/media/v4l2-core/v4l2-flash-led-class.c     | 13 +++
 include/linux/led-class-flash.h                    | 18 ++++-
 include/uapi/linux/v4l2-controls.h                 |  1 +
 7 files changed, 141 insertions(+), 4 deletions(-)
---
base-commit: 9fc81f92bc8a84772e4a4094649601e7665a6092
change-id: 20250303-ov9282-flash-strobe-ac6bd00c9de6
prerequisite-change-id: 20250225-b4-ov9282-gain-ef1cdaba5bfd:v1
prerequisite-patch-id: 86f2582378ff7095ab65ce4bb25a143eb639e840
prerequisite-patch-id: b06eb6ec697aaf0b3155b4b2370f171d0d304ae2
prerequisite-patch-id: b123047d71bfb9b93f743bbdd6893d5a98495801

Best regards,
-- 
Richard Leitner <richard.leitner@linux.dev>



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-04-03  7:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14  8:49 [PATCH v2 0/8] Add strobe/flash duration v4l2 ctrl & use it for ov9282 Richard Leitner
2025-03-14  8:49 ` [PATCH v2 1/8] media: v4l: ctrls: add a control for flash/strobe duration Richard Leitner
2025-03-14  9:20   ` Sakari Ailus
2025-03-14 10:25     ` Richard Leitner
2025-03-14 13:34       ` Sakari Ailus
2025-03-14 16:08         ` Richard Leitner
2025-03-18 13:28           ` Sakari Ailus
2025-03-18 13:42             ` Richard Leitner
2025-03-18 14:06               ` Sakari Ailus
2025-03-18 14:46                 ` Richard Leitner
2025-03-18 15:11                   ` Sakari Ailus
2025-03-18 16:39                     ` Dave Stevenson
2025-03-19 10:06                       ` Sakari Ailus
2025-03-25  8:20                         ` Richard Leitner
2025-04-03  7:16                           ` Sakari Ailus
2025-03-14  8:49 ` [PATCH v2 2/8] media: v4l2-flash: add support for flash/stobe duration Richard Leitner
2025-03-14  9:51   ` Lee Jones
2025-03-14 10:29     ` Richard Leitner
2025-03-14  8:49 ` [PATCH v2 3/8] media: v4l2-flash: fix flash_timeout comment Richard Leitner
2025-03-14  8:49 ` [PATCH v2 4/8] Documentation: uAPI: media: add V4L2_CID_FLASH_DURATION Richard Leitner
2025-03-14  9:41   ` Hans Verkuil
2025-03-14 10:28     ` Richard Leitner
2025-03-14 10:36       ` Hans Verkuil
2025-03-25  8:24         ` Richard Leitner
2025-04-03  7:15           ` Sakari Ailus
2025-03-14  8:49 ` [PATCH v2 5/8] media: i2c: ov9282: add output enable register definitions Richard Leitner
2025-03-14  8:50 ` [PATCH v2 6/8] media: i2c: ov9282: add led_mode v4l2 control Richard Leitner
2025-03-14  8:50 ` [PATCH v2 7/8] media: i2c: ov9282: add strobe_duration " Richard Leitner
2025-03-14  8:50 ` [PATCH v2 8/8] media: i2c: ov9282: add strobe_source " Richard Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox