From nobody Fri Oct 3 12:24:13 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0B5633CE81; Mon, 1 Sep 2025 15:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756739147; cv=none; b=iOLxkABjSfevzhVpJt7ZTB7wkemB4tzxV6B+KVMGK3CghJ50q3JUnHyvjBS7FSKf6575D4y9KcLR49gr3qMLjm+dnpJhYQwzoXetvnfW88EWKKERqI0Rgo9jSxNx/4HY94DxGUqsv9jX+ZSGxV5SSnPsb423zxaVYiYcL95Ydds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756739147; c=relaxed/simple; bh=jOvUMaocrhEnRezQ9AILTqpnj23H8z9zfwuanCjxrwo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DL2ygzARsPZNkVr9Rzg2N9my3ARL4JxkalSKBgNOga4arSfupZtjo95X297fBGQ0Fp06YpphIpgwWj/ApFf8Q88b/918fWX0qUoZHmFlhERCc6H4uc8ua0/AQs9Ztmk5HdNxgpkfa1toggCWkbI5x1jj3PuIbCZEv/XfAazbotc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Zg9zfv76; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Zg9zfv76" Received: by smtp.kernel.org (Postfix) with ESMTPS id 97590C4CEF1; Mon, 1 Sep 2025 15:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1756739146; bh=jOvUMaocrhEnRezQ9AILTqpnj23H8z9zfwuanCjxrwo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Zg9zfv76/5sxArS4Morpm3TM5oIRX16jauiHMdPKmqLOOC3WjJouXWCUbFBAmsNdF n1Gqvp0Gie3S77GV2Sxgbwx47RECyp4oFv6M9XVSYDKy+Cx5ETTofAm+fYVkhD4Ago DGZphYMuGNJmETXSiRBjkuPUNfdmEs0dY6wKpUcg= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89751CA0FFF; Mon, 1 Sep 2025 15:05:46 +0000 (UTC) From: Richard Leitner Date: Mon, 01 Sep 2025 17:05:06 +0200 Subject: [PATCH v7 01/10] media: v4l: ctrls: add a control for flash/strobe duration Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250901-ov9282-flash-strobe-v7-1-d58d5a694afc@linux.dev> References: <20250901-ov9282-flash-strobe-v7-0-d58d5a694afc@linux.dev> In-Reply-To: <20250901-ov9282-flash-strobe-v7-0-d58d5a694afc@linux.dev> To: Sakari Ailus , Dave Stevenson , Mauro Carvalho Chehab , Lee Jones , Pavel Machek , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, Richard Leitner , Hans Verkuil X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1756739145; l=1793; i=richard.leitner@linux.dev; s=20250225; h=from:subject:message-id; bh=jOvUMaocrhEnRezQ9AILTqpnj23H8z9zfwuanCjxrwo=; b=xQ66Po6LAaBNKNWkFs1RK+2cNs2deYefEdW/9XmyPO97jnU703xkVy7KXGOuazGlwJId1gGvD PWOb3smMZZEDjKEF4RKuKy8wiGGkqoRbfEI9yrsj91vZTCZEFZF31Nh X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=8hZNyyyQFqZ5ruVJsSGBSPIrmJpfDm5HwHU4QVOP1Pk= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20250225 with auth_id=350 Add a control V4L2_CID_FLASH_DURATION to set the duration of a flash/strobe pulse. This is different to the V4L2_CID_FLASH_TIMEOUT control, as the timeout defines a limit after which the flash is "forcefully" turned off again. On the other hand the new V4L2_CID_FLASH_DURATION is the desired length of the flash/strobe pulse. Signed-off-by: Richard Leitner Reviewed-by: Laurent Pinchart --- drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 + include/uapi/linux/v4l2-controls.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2= -core/v4l2-ctrls-defs.c index 1ea52011247accc51d0261f56eab1cf13c0624a0..f9ed7273a9f3eafe01c31b638e1= c8d9fcf5424af 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -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"; =20 /* JPEG encoder controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-c= ontrols.h index f836512e9debbc65d62a9fe04069b056be42f7b2..a5b7c382d77118eb7966385c5b2= 2d5a89bc2b272 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1186,6 +1186,7 @@ enum v4l2_flash_strobe_source { =20 #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) =20 =20 /* JPEG-class control IDs */ --=20 2.47.2