From patchwork Thu Sep 12 20:10:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11143747 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 187EA16B1 for ; Thu, 12 Sep 2019 20:09:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0290A208E4 for ; Thu, 12 Sep 2019 20:09:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727362AbfILUJn (ORCPT ); Thu, 12 Sep 2019 16:09:43 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:50415 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbfILUJn (ORCPT ); Thu, 12 Sep 2019 16:09:43 -0400 X-Originating-IP: 85.243.204.24 Received: from uno.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5FF4420004; Thu, 12 Sep 2019 20:09:39 +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 v3 02/11] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_LOCATION Date: Thu, 12 Sep 2019 22:10:46 +0200 Message-Id: <20190912201055.13964-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190912201055.13964-1-jacopo@jmondi.org> References: <20190912201055.13964-1-jacopo@jmondi.org> MIME-Version: 1.0 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..f879dcc9409c 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 as the camera location is + expressed as a position relative to the device 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 it to move freely, such as + webcams and digital cameras, are said to be have ``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.