From patchwork Wed Oct 4 07:19:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Kharuk X-Patchwork-Id: 730911 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 AD54D6FC4 for ; Wed, 4 Oct 2023 07:20:05 +0000 (UTC) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D4C5AC for ; Wed, 4 Oct 2023 00:20:03 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9ad8a822508so325466666b.0 for ; Wed, 04 Oct 2023 00:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=melexis.com; s=google; t=1696404002; x=1697008802; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=imCZDPmKhvVM5uCss54/MVO/bMAfcXA+npTIcf/0h0w=; b=iBRyId7TO5HeRByR58oUeIYOaPX/X1NcxR3yr/EtkGS+cfdkG+bK2kD0vJq9Xy4Esr bxQG12E7ajBKgPxXUMRL0IQPZhYwVzg2hje++Oz32jfRLR5ecmwuCgByjpTqXLsJD0dU KMFdg6QkioAZHI7LukwZZC4/2Ul2UlSHzGCoD/nizoR4T1JUUO6Z9PWTr1ezXXfOphWd 4aW7n8k7DEN03SV3UqQJcbitXupCxFPGQD4gw2inu9yyvfWfOvNRMHhto292CSMJbsw4 xTSBO2tBX/Jlzgq43EOpHtCXhhkGn0B639faR/KxtE/V2RhSNKmZpOmH7pSW5/5cWTdo /XzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696404002; x=1697008802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=imCZDPmKhvVM5uCss54/MVO/bMAfcXA+npTIcf/0h0w=; b=QKq6u/crnd3u3uI6XliGBXYeWJv/MHZ5750rx9s+an6iA2Fuv1uzG/ePMB8PFU7hFb hwEuCsKjjslpvSHKXlB7GQ3gY84+2NpPsfIcDd9OzMpChGFOCc94dyJhtncxfA7AOgfA 7ctqcVXqvASc5j7hyK//PF4qQhTxg5kbp44FGJ4FEO6VCCjyjkx+GJBvi7Lm/2T1JjeB JO3xxgnS2xAwBVtIQIKiuTyKhWX3+0mawyDEaSj7/G8LX3lkWWJ8uT0LQIhNFfF48tf1 uNu5/scQygo1XkCTpgGM4kD4tpvoC3bhRYKsWPvOfWPV6+QyEzlT2dBF4vhexKgI/OPG xflQ== X-Gm-Message-State: AOJu0YyT3+CgVwjAT9Gj1Co3Hu8ZZTiHmssdGYJ4Rsu+zNewBFNuvSHG MkCEUT8Q/8SDQp8V9UKFqLIutw== X-Google-Smtp-Source: AGHT+IFMm8w0C4PCwzMFMnjGndx3ZM5io7F841AB/gBJW5UhU2tXXwWRKLFJ62oDLGZU4EhQcnmaDw== X-Received: by 2002:a17:906:1ba9:b0:9ae:57b8:ad1b with SMTP id r9-20020a1709061ba900b009ae57b8ad1bmr1194421ejg.21.1696404001814; Wed, 04 Oct 2023 00:20:01 -0700 (PDT) Received: from melexis ([91.192.181.19]) by smtp.gmail.com with ESMTPSA id 11-20020a170906058b00b009add084a00csm2285935ejn.36.2023.10.04.00.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 00:20:01 -0700 (PDT) From: Volodymyr Kharuk To: Cc: Andrii Kyselov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Laurent Pinchart , devicetree@vger.kernel.org, Hans Verkuil , Sakari Ailus , Benjamin Mugnier , Volodymyr Kharuk Subject: [PATCH v5 3/8] media: Documentation: v4l: Add TOF class controls Date: Wed, 4 Oct 2023 10:19:42 +0300 Message-Id: <4f8f84b835e15c17e2277f1f76f073aa3901ed73.1696347109.git.vkh@melexis.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Add description about V4L2_CID_TOF_PHASE_SEQ, V4L2_CID_TOF_FMOD and V4L2_CID_TOF_TINT. Also updated MAINTAINERS with new ext-ctrls-tof file. Signed-off-by: Volodymyr Kharuk Acked-by: Benjamin Mugnier --- .../userspace-api/media/v4l/common.rst | 1 + .../userspace-api/media/v4l/ext-ctrls-tof.rst | 56 +++++++++++++++++++ MAINTAINERS | 7 +++ 3 files changed, 64 insertions(+) create mode 100644 Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst diff --git a/Documentation/userspace-api/media/v4l/common.rst b/Documentation/userspace-api/media/v4l/common.rst index ea0435182e44..1ea79e453066 100644 --- a/Documentation/userspace-api/media/v4l/common.rst +++ b/Documentation/userspace-api/media/v4l/common.rst @@ -52,6 +52,7 @@ applicable to all devices. ext-ctrls-fm-rx ext-ctrls-detect ext-ctrls-colorimetry + ext-ctrls-tof fourcc format planar-apis diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst new file mode 100644 index 000000000000..fd8969d3d354 --- /dev/null +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst @@ -0,0 +1,56 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _tof-controls: + +*************************************** +Time of Flight Camera Control Reference +*************************************** + +The Time of Flight class includes controls for digital features +of the TOF sensor. + +TOF sensor is a receiver chip. Each pixel in the sensor measures the travel time +of light to that pixel and hence the distance to the object seen by that pixel. +There are different types of TOF sensors. Direct TOF sensors (also known +as Lidars) send a single pulse and measure direct time of flight. +Another type of TOF is indirect TOF sensors, which emit continuous wave +(could be radio or infrared) and then measure phase shift of reflected light. +The sensor modulates outgoing light and then collects reflected photons +as an electric charge with modulated pattern. Knowing the frequency of +the pattern you can calculate the real distance. + +For more information about TOF sensors see +`TOF `__ from Wikipedia. +Also, there are other nice explanations from vendors about indirect TOF: +`Microsoft `__, +`Melexis `__, +`TI `__. + +.. _tof-control-id: + +Time of Flight Camera Control IDs +================================= + +``V4L2_CID_TOF_CLASS (class)`` + The TOF class descriptor. Calling :ref:`VIDIOC_QUERYCTRL` for + this control will return a description of this control class. + +``V4L2_CID_TOF_PHASE_SEQ (dynamic array u16)`` + Change the shift between illumination and sampling for each phase + in degrees. The distance / amplitude (confidence) pictures are obtained + by merging 3..8 captures of the same scene using different phase shifts + (some TOF sensors use different frequency modulations). + + The size of dynamic array specify the number of captures. + Also driver may decide whether V4L2_CID_TOF_FREQ_MOD and + V4L2_CID_TOF_TIME_INTEGRATION should change the number + of captures or rely on V4L2_CID_TOF_PHASE_SEQ control. + The maximum size of the array is driver specific. + +``V4L2_CID_TOF_FREQ_MOD (dynamic array u32)`` + The control sets the modulation frequency (in Hz) for each phase. + The maximum array size is driver specific. + +``V4L2_CID_TOF_TIME_INTEGRATION (dynamic array u16)`` + The control sets the integration time (in us) for each phase. + The maximum array size is driver specific. diff --git a/MAINTAINERS b/MAINTAINERS index 90f13281d297..83e325e273dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13557,6 +13557,13 @@ S: Supported W: http://www.melexis.com F: drivers/iio/temperature/mlx90632.c +MELEXIS MLX7502X DRIVER +M: Volodymyr Kharuk +L: linux-media@vger.kernel.org +S: Supported +W: http://www.melexis.com +F: Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst + MELFAS MIP4 TOUCHSCREEN DRIVER M: Sangwon Jee S: Supported