]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: v4l: ctrls: add a control for flash/strobe duration
authorRichard Leitner <richard.leitner@linux.dev>
Tue, 9 Dec 2025 22:44:36 +0000 (23:44 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 16 Jan 2026 13:08:53 +0000 (14:08 +0100)
Add a V4L2_CID_FLASH_DURATION control to set the duration of a
flash/strobe pulse. This controls the length of the flash/strobe pulse
output by device (typically a camera sensor) and connected to the flash
controller. This is different to the V4L2_CID_FLASH_TIMEOUT control,
which is implemented by the flash controller and defines a limit after
which the flash is "forcefully" turned off again.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls-defs.c
include/uapi/linux/v4l2-controls.h

index ad41f65374e2396f30f9798235401705af366622..4848423205ff7a274c970b1d5994d89af1bd70f4 100644 (file)
@@ -1135,6 +1135,7 @@ const char *v4l2_ctrl_get_name(u32 id)
        case V4L2_CID_FLASH_FAULT:              return "Faults";
        case V4L2_CID_FLASH_CHARGE:             return "Charge";
        case V4L2_CID_FLASH_READY:              return "Ready to Strobe";
+       case V4L2_CID_FLASH_DURATION:           return "Strobe Duration";
 
        /* JPEG encoder controls */
        /* Keep the order of the 'case's the same as in v4l2-controls.h! */
index f84ed133a6c9b2ddc1aedbd582ddf78cb71f34e5..357845830fe96e4d11d38c3b60d73c6b67fb7be5 100644 (file)
@@ -1192,6 +1192,7 @@ enum v4l2_flash_strobe_source {
 
 #define V4L2_CID_FLASH_CHARGE                  (V4L2_CID_FLASH_CLASS_BASE + 11)
 #define V4L2_CID_FLASH_READY                   (V4L2_CID_FLASH_CLASS_BASE + 12)
+#define V4L2_CID_FLASH_DURATION                        (V4L2_CID_FLASH_CLASS_BASE + 13)
 
 
 /* JPEG-class control IDs */