From nobody Tue Dec 16 11:00:35 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 95E2D1D5149; Fri, 14 Mar 2025 08:50:05 +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=1741942205; cv=none; b=O3R17gmwDUgtlXSC1/GQlNY5sHd4wNKS6er77S8YMrbvmD+H2S5u6P3KYOWnpeMA3kwrhyywOvBOcstx8g8IlShI3bMX5+LKv9O+LWOuJavDKxdIitFFHteNXXMRZr0jG4j4r25aYVz68I96cIwYY5p1ujm77lfC+TbPYQgyIRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741942205; c=relaxed/simple; bh=7Wa0VBhegKQxMT3McKkSxf40miWJulhfAtbtVLQyTlI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mydo9kUWPQjkNuGC3UPZR7du21WUQ2a9P8RY3sKyVac8yHO5VsNNEPm0EEGSUPzueIklOzd/fW6wnxLR+ouJV7wG4IAT2QCplO2VTYf15y1e2uc1qjOBYqEmp1fmgvW5EQtunPaCpHmOMGD8GRw65NafhO1ob4CvMaUhi0L8Z4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=C6V9cafQ; 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="C6V9cafQ" Received: by smtp.kernel.org (Postfix) with ESMTPS id 25040C4CEE3; Fri, 14 Mar 2025 08:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1741942205; bh=7Wa0VBhegKQxMT3McKkSxf40miWJulhfAtbtVLQyTlI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C6V9cafQfb3ysQvBN6ARgvQsRHF6V6Kw2g8EfcndO5sz5HO1Ff+Hr5VoDW6Sg5nu4 0S9aRNN4ZGItuGDP8ci64RJLkeEbGoEfJOcXj0dloGFBzBnWOqVsmn62yi7dFSGmLA c2xF4uYYV8Brq5YS221fGIF3HNmTVHY+U/wo6rnU= 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 0D6F9C35FF1; Fri, 14 Mar 2025 08:50:05 +0000 (UTC) From: Richard Leitner Date: Fri, 14 Mar 2025 09:49:55 +0100 Subject: [PATCH v2 1/8] 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: <20250314-ov9282-flash-strobe-v2-1-14d7a281342d@linux.dev> References: <20250314-ov9282-flash-strobe-v2-0-14d7a281342d@linux.dev> In-Reply-To: <20250314-ov9282-flash-strobe-v2-0-14d7a281342d@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 X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741942203; l=1792; i=richard.leitner@linux.dev; s=20250225; h=from:subject:message-id; bh=7Wa0VBhegKQxMT3McKkSxf40miWJulhfAtbtVLQyTlI=; b=mrnCjztFt4S0tdo2//Owp7ioS+OjiVRZnM+l/XPDyRbp5uGLKuWPEDY+S5ze0E8BAy6vaiIbZ PRLmkeg4lXIAPY+tON/0iDpnHOTaIuJ6AJfSTcnRbmbCp6CvgNPccaP 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 --- 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 974fd254e57309e6def95b4a4f8e4de13a3972a7..80050cadb8377e3070ebbadc493= fcd08b2c12c0b 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1173,6 +1173,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