From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 212C2C47404 for ; Mon, 7 Oct 2019 16:27:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03B7F206C0 for ; Mon, 7 Oct 2019 16:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728864AbfJGQ1n (ORCPT ); Mon, 7 Oct 2019 12:27:43 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:55907 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728862AbfJGQ1n (ORCPT ); Mon, 7 Oct 2019 12:27:43 -0400 X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id CCD70240006; Mon, 7 Oct 2019 16:27:40 +0000 (UTC) From: Jacopo Mondi To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Laurent Pinchart , tfiga@google.com, pavel@ucw.cz Cc: Jacopo Mondi , linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)) Subject: [PATCH v4 02/11] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_LOCATION Date: Mon, 7 Oct 2019 18:29:04 +0200 Message-Id: <20191007162913.250743-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191007162913.250743-1-jacopo@jmondi.org> References: <20191007162913.250743-1-jacopo@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add documentation for the V4L2_CID_CAMERA_SENSOR_LOCATION camera control. The newly added read-only control reports the camera device mounting position. Signed-off-by: Jacopo Mondi --- .../media/uapi/v4l/ext-ctrls-camera.rst | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst index 51c1d5c9eb00..b151c016256c 100644 --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst @@ -510,6 +510,38 @@ enum v4l2_scene_mode - value down. A value of zero stops the motion if one is in progress and has no effect otherwise. +``V4L2_CID_CAMERA_SENSOR_LOCATION (integer)`` + This read-only control describes the camera sensor location by reporting + its mounting position on the device where the camera is installed. The + control value is constant and not modifiable by software. This control is + particularly meaningful for devices which have a well defined orientation, + such as phones, laptops and portable devices since the camera location is + expressed as a position relative to the device's intended usage orientation. + For example, a camera sensor installed on the user-facing side of a phone, + a tablet or a laptop device is said to be installed in the + ``V4L2_LOCATION_FRONT`` location while camera sensors installed on the side + opposite the front one are said to be installed in the + ``V4L2_LOCATION_BACK`` location. Camera sensors not directly attached to + the device or attached in a way that allows them to move freely, such as + webcams and digital cameras, are said to have the ``V4L2_LOCATION_EXTERNAL`` + location. + + + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LOCATION_FRONT`` + - The camera sensor is located on the front side of the device. + * - ``V4L2_LOCATION_BACK`` + - The camera sensor is located on the back side of the device. + * - ``V4L2_LOCATION_EXTERNAL`` + - The camera sensor is not directly attached to the device and is + freely movable. + + + .. [#f1] This control may be changed to a menu control in the future, if more options are required. -- 2.23.0