Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2189273ybl; Thu, 15 Aug 2019 07:56:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPIRBoZWzl99COayanGZCgVSw7SGep2istA/r96V7lw7vbgEqwSszwTs5dLjNPUih2tmwA X-Received: by 2002:a17:90a:2069:: with SMTP id n96mr2594568pjc.4.1565881010256; Thu, 15 Aug 2019 07:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565881010; cv=none; d=google.com; s=arc-20160816; b=R/eXD9dylndX83IfTBkNbtUYKI60AXOKCqPMWUhVU8WX55SO3O0AKT5dwRZLI9yY2b wQZ0eRyRlB6yzGJWepQYFNEOejI5C6Dv3Uytbk5EdSkbRbinXogiyOvN87hfLn4lKB8S zZRx5TcTdxXvKg7Kr9H6lYryXjloISu/Mz60gtt24psH82TZwrdKbf1FrhXc6EKYQzeM Wzw5FJ6RZujkuDY8TtWUrU0YRL94QCn+Ckx6ba0MiIWMwu3LSn2D0QXgCxsbleGwGBzK fIzU5yTsCKSiIlsh1N6mocegg6IyKlqG5yiKuFDl7VNbNoedl3fF2FGnbEKXcc8lxHat EWwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4s06nEuCsjLgOtW+bma3xTrPlx8KjmmqQQI6zg5ixVU=; b=MzxhJJdXdkNiI1Nrhw9WG7RuZHwl3xtJr/lhw2TaG5xDlwf9pQoDeJa0Lo6HckQnx/ j2+uklLJLzEh505GtcQVDpoTS783961KGzkiRM9ppiUTo3MmjgH8oxT3JnGASWoBW7Wd DEMOywCba5UTg/lP5uMWPMtRPC2VoFGlgZjbS7NLLRvCUrOwTNuPbTbDCzG7Q2T5Ipe6 Ej+l5ZB7OZWvSh6Hx3fcoVXUQXhzMB/YaGN3ogwLEVeoZnI0QF2L6xYaj80QuqWbQR6i HzOJxgSRx/h1v8tfw9pK9xjZR/a+Wv4pwca60G4nUx+FLnlsEuna8zvx9q+KOURLBgPF ZgYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=mIsb0y5c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si1117471pjb.13.2019.08.15.07.56.34; Thu, 15 Aug 2019 07:56:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=mIsb0y5c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731964AbfHOM7o (ORCPT + 99 others); Thu, 15 Aug 2019 08:59:44 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:45250 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729818AbfHOM7n (ORCPT ); Thu, 15 Aug 2019 08:59:43 -0400 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3057C2AF; Thu, 15 Aug 2019 14:59:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1565873982; bh=9RXPYkKMdR+TDC9Nqxfdpw80GoGOeN54oma8IugNDuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mIsb0y5cdOx+hT9MJGCnoxY5cpeQ41AmcekNyBw1XHfEUBbeeFOphB7fFreTbYbHF mUgbDNRmGcVLZZJ7Ql3MFVNvdztZ4h4McVu1iu4qkHNZY88Cx3nta2tZbIcNISfofp Nq8II5XtcOhJiXu5vyuC86jJwA1LZfUMMWQZl4Gk= Date: Thu, 15 Aug 2019 15:59:38 +0300 From: Laurent Pinchart To: Sakari Ailus Cc: Jacopo Mondi , Mauro Carvalho Chehab , Hans Verkuil , "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" , open list Subject: Re: [RFC 2/5] media: v4l2-ctrl: Document V4L2_CID_LOCATION Message-ID: <20190815125938.GI13823@pendragon.ideasonboard.com> References: <20190814202815.32491-1-jacopo@jmondi.org> <20190814202815.32491-3-jacopo@jmondi.org> <20190815070025.GK6133@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190815070025.GK6133@paasikivi.fi.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, On Thu, Aug 15, 2019 at 10:00:25AM +0300, Sakari Ailus wrote: > On Wed, Aug 14, 2019 at 10:28:12PM +0200, Jacopo Mondi wrote: > > Add documentation for the V4L2_CID_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 | 23 +++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > index 51c1d5c9eb00..fc0a02eee6d4 100644 > > --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > @@ -510,6 +510,29 @@ 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_LOCATION (integer)`` > > + This read-only control describes the camera location by reporting its > > + mounting position on the device where the camera is installed. 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 position. In example, a camera installed on the user-facing side > > s/In/For/ > > > + of a phone device is said to be installed in the ``V4L2_LOCATION_FRONT`` > > + position. > > + > > + > > + > > +.. flat-table:: > > + :header-rows: 0 > > + :stub-columns: 0 > > + > > + * - ``V4L2_LOCATION_FRONT`` > > + - The camera device is located on the front side of the device. > > + * - ``V4L2_LOCATION_BACK`` > > + - The camera device is located on the back side of the device. > > + > > + > > + > > .. [#f1] > > This control may be changed to a menu control in the future, if more > > options are required. > > There's an effective limit of 64 for menus. ACPI has less than ten > different locations for a device, I think 64 will be enough here. > > So I'd be actually in favour of switching to a menu. Why ? As you explained yourself, it's a static read-only control, all it needs to report is a single value. -- Regards, Laurent Pinchart