[{"id":35838,"web_url":"https://patchwork.libcamera.org/comment/35838/","msgid":"<175802083953.103890.1116711819553089508@isaac-ThinkPad-T16-Gen-2>","date":"2025-09-16T11:07:19","subject":"Re: [PATCH v2 3/5] Documentation: Add flash driver requirements","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Hi Matthias,\n\nThank you for the patch!\n\nQuoting Matthias Fend (2025-09-12 08:13:22)\n> Document the requirements for the v4l2 flash device drivers required by\n> libcamera.\n> \n> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>\n> ---\n>  Documentation/documentation-contents.rst    |  1 +\n>  Documentation/flash_driver_requirements.rst | 40 +++++++++++++++++++++++++++++\n>  Documentation/index.rst                     |  1 +\n>  Documentation/meson.build                   |  1 +\n>  4 files changed, 43 insertions(+)\n> \n> diff --git a/Documentation/documentation-contents.rst b/Documentation/documentation-contents.rst\n> index 5c1118493745692f2521bced9dab48098585c39e..be7415cde42f55ae5f9da20bc9211227b8f8658c 100644\n> --- a/Documentation/documentation-contents.rst\n> +++ b/Documentation/documentation-contents.rst\n> @@ -22,6 +22,7 @@\n>     * :doc:`/internal-api-html/index`\n>     * |\n>     * **Documentation for System Integrators**\n> +   * :doc:`/flash_driver_requirements`\n>     * :doc:`/lens_driver_requirements`\n>     * :doc:`/sensor_driver_requirements`\n>  \n> diff --git a/Documentation/flash_driver_requirements.rst b/Documentation/flash_driver_requirements.rst\n> new file mode 100644\n> index 0000000000000000000000000000000000000000..b4a1b4866e651c506203af7089b5634808de5ab7\n> --- /dev/null\n> +++ b/Documentation/flash_driver_requirements.rst\n> @@ -0,0 +1,40 @@\n> +.. SPDX-License-Identifier: CC-BY-SA-4.0\n> +\n> +.. include:: documentation-contents.rst\n> +\n> +.. _flash-driver-requirements:\n> +\n> +Flash Driver Requirements\n> +=========================\n> +\n> +libcamera handles V4L2 flash devices in the CameraFlash class and defines\n> +a consistent interface through its API towards other library components.\n> +\n> +The CameraFlash class uses the V4L2 subdev kernel API to interface with the\n> +camera flash through a sub-device exposed to userspace by the V4L2 flash driver.\n> +\n> +In order for libcamera to be fully operational and provide all the required\n> +information to interface with the camera flash to applications and pipeline\n> +handlers, the driver must support a set of mandatory features.\n> +\n> +Mandatory Requirements\n> +----------------------\n> +\n> +The flash driver is assumed to be fully compliant with the V4L2 specification.\n> +\n> +The flash driver shall support the following V4L2 controls:\n> +\n> +* `V4L2_CID_FLASH_LED_MODE`_\n> +* `V4L2_CID_FLASH_STROBE_SOURCE`_\n> +* `V4L2_CID_FLASH_STROBE`_\n> +* `V4L2_CID_FLASH_TIMEOUT`_\n> +* `V4L2_CID_FLASH_INTENSITY`_\n> +* `V4L2_CID_FLASH_TORCH_INTENSITY`_\n> +\n> +.. _V4L2_CID_FLASH_LED_MODE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +.. _V4L2_CID_FLASH_STROBE_SOURCE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +.. _V4L2_CID_FLASH_STROBE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +.. _V4L2_CID_FLASH_TIMEOUT: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +.. _V4L2_CID_FLASH_INTENSITY: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +.. _V4L2_CID_FLASH_TORCH_INTENSITY: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html\n> +\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n> diff --git a/Documentation/index.rst b/Documentation/index.rst\n> index 251112fbdf5f075b3e5c064d7230b9ad2c23b587..7ed56c17787fc643ef74cc35ef5b5db7d29eb18d 100644\n> --- a/Documentation/index.rst\n> +++ b/Documentation/index.rst\n> @@ -14,6 +14,7 @@\n>     Camera Sensor Model <camera-sensor-model>\n>     Environment variables <environment_variables>\n>     Feature Requirements <feature_requirements>\n> +   Flash driver requirements <flash_driver_requirements>\n>     IPA Writer's guide <guides/ipa>\n>     Lens driver requirements <lens_driver_requirements>\n>     libcamera Architecture <libcamera_architecture>\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index a8d4afc01dd154546d107b49bc322a993e4d78bd..965b33c60b031610251efbe59abb1682cb714d4a 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -159,6 +159,7 @@ if sphinx.found()\n>          'documentation-contents.rst',\n>          'environment_variables.rst',\n>          'feature_requirements.rst',\n> +        'flash_driver_requirements.rst',\n>          'guides/application-developer.rst',\n>          'guides/ipa.rst',\n>          'guides/pipeline-handler.rst',\n> \n> -- \n> 2.34.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EF94DC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Sep 2025 11:07:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9887869371;\n\tTue, 16 Sep 2025 13:07:23 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E15D613A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Sep 2025 13:07:22 +0200 (CEST)","from thinkpad.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 644A9E8A;\n\tTue, 16 Sep 2025 13:06:04 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P5xV51si\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758020764;\n\tbh=ypB9fBLxsfNW5emc2ofjzF3uOl9uGe58vQOcBYdHuiY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=P5xV51siUFT/u3c8u/RV3/aFnkE/2U/lfH1fhqTOCGKvyOMFLa9ZebfDA8RChm3ms\n\to67k/rh14XGB75LlknaobitZ6Ccd4aD6fQit9vxbXqvxO46nFoJAyVnq5nUwUsgR7x\n\t+Q58bzzsdEmxyKv+iz9jBwje7kdCDhMSf7vyDhWg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250912-flash_reco-v2-3-d5bb80a2e619@emfend.at>","References":"<20250912-flash_reco-v2-0-d5bb80a2e619@emfend.at>\n\t<20250912-flash_reco-v2-3-d5bb80a2e619@emfend.at>","Subject":"Re: [PATCH v2 3/5] Documentation: Add flash driver requirements","From":"Isaac Scott <isaac.scott@ideasonboard.com>","Cc":"Matthias Fend <matthias.fend@emfend.at>","To":"Matthias Fend <matthias.fend@emfend.at>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 16 Sep 2025 12:07:19 +0100","Message-ID":"<175802083953.103890.1116711819553089508@isaac-ThinkPad-T16-Gen-2>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]