From: Richard Leitner <richard.leitner@linux.dev>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-leds@vger.kernel.org,
Richard Leitner <richard.leitner@linux.dev>
Subject: [PATCH v5 00/10] Add strobe/flash duration v4l2 ctrl & use it for ov9282
Date: Tue, 17 Jun 2025 09:31:34 +0200 [thread overview]
Message-ID: <20250617-ov9282-flash-strobe-v5-0-9762da74d065@linux.dev> (raw)
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 v5:
- Improve try_ctrl for flash_duration by using DIV_ROUND_UP() and abs() (thanks Sakari)
- Drop "leds: flash: Add support for flash/strobe duration" as this was applied upstream
- Add "media: i2c: ov9282: dynamic flash_duration maximum" (thanks Sakari)
- Link to v4: https://lore.kernel.org/r/20250507-ov9282-flash-strobe-v4-0-72b299c1b7c9@linux.dev
Changes in v4:
- Fix FLASH_DURATION implementation in v4l2-flash-led-class.c by adding a
missing brace and enum entry (thanks Sakari)
- Fix format of multiline comment in ov9282.c (thanks Sakari)
- Add missing NULL check in ov9282.c (thanks Sakari)
- Adapt nr_of_controls_hint for v4l2 handler in ov9282.c (thanks Sakari)
- Add patch for implementing try_ctrl for strobe_duration (thanks Sakari)
- Link to v3: https://lore.kernel.org/r/20250429-ov9282-flash-strobe-v3-0-2105ce179952@linux.dev
Changes in v3:
- create separate patch for leds driver changes (thanks Lee)
- Link to v2: https://lore.kernel.org/r/20250314-ov9282-flash-strobe-v2-0-14d7a281342d@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 (10):
media: v4l: ctrls: add a control for flash/strobe duration
media: v4l2-flash: add support for flash/strobe 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
media: i2c: ov9282: implement try_ctrl for strobe_duration
media: i2c: ov9282: dynamic flash_duration maximum
.../userspace-api/media/v4l/ext-ctrls-flash.rst | 5 +
drivers/media/i2c/ov9282.c | 172 ++++++++++++++++++++-
drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 +
drivers/media/v4l2-core/v4l2-flash-led-class.c | 25 +++
include/linux/led-class-flash.h | 2 +-
include/uapi/linux/v4l2-controls.h | 1 +
6 files changed, 199 insertions(+), 7 deletions(-)
---
base-commit: d9946fe286439c2aeaa7953b8c316efe5b83d515
change-id: 20250303-ov9282-flash-strobe-ac6bd00c9de6
Best regards,
--
Richard Leitner <richard.leitner@linux.dev>
next reply other threads:[~2025-06-17 7:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 7:31 Richard Leitner [this message]
2025-06-17 7:31 ` [PATCH v5 01/10] media: v4l: ctrls: add a control for flash/strobe duration Richard Leitner
2025-06-17 7:31 ` [PATCH v5 02/10] media: v4l2-flash: add support " Richard Leitner
2025-06-17 7:31 ` [PATCH v5 03/10] media: v4l2-flash: fix flash_timeout comment Richard Leitner
2025-06-19 9:37 ` (subset) " Lee Jones
2025-06-19 9:38 ` Lee Jones
2025-07-01 6:36 ` Richard Leitner
2025-06-17 7:31 ` [PATCH v5 04/10] Documentation: uAPI: media: add V4L2_CID_FLASH_DURATION Richard Leitner
2025-06-17 7:31 ` [PATCH v5 05/10] media: i2c: ov9282: add output enable register definitions Richard Leitner
2025-06-17 7:31 ` [PATCH v5 06/10] media: i2c: ov9282: add led_mode v4l2 control Richard Leitner
2025-07-09 21:12 ` Sakari Ailus
2025-07-10 6:50 ` Richard Leitner
2025-07-10 8:14 ` Sakari Ailus
2025-07-11 7:41 ` Richard Leitner
2025-07-30 20:39 ` Sakari Ailus
2025-08-04 13:33 ` Richard Leitner
2025-06-17 7:31 ` [PATCH v5 07/10] media: i2c: ov9282: add strobe_duration " Richard Leitner
2025-06-17 7:31 ` [PATCH v5 08/10] media: i2c: ov9282: add strobe_source " Richard Leitner
2025-06-17 7:31 ` [PATCH v5 09/10] media: i2c: ov9282: implement try_ctrl for strobe_duration Richard Leitner
2025-06-18 13:04 ` kernel test robot
2025-06-17 7:31 ` [PATCH v5 10/10] media: i2c: ov9282: dynamic flash_duration maximum Richard Leitner
2025-07-09 5:24 ` [PATCH v5 00/10] Add strobe/flash duration v4l2 ctrl & use it for ov9282 Richard Leitner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250617-ov9282-flash-strobe-v5-0-9762da74d065@linux.dev \
--to=richard.leitner@linux.dev \
--cc=dave.stevenson@raspberrypi.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pavel@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox