Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2076291ybl; Thu, 15 Aug 2019 06:13:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYQMfUHc2ugTSKMSoPHMjLKtUMxNHsGag1KAVvBsDUZrBB9CcF3pge9Y3MNTDWnl71NW01 X-Received: by 2002:a65:4205:: with SMTP id c5mr3379381pgq.265.1565874803474; Thu, 15 Aug 2019 06:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565874803; cv=none; d=google.com; s=arc-20160816; b=cXIFv6SFOOlMi4X+yWRydWp7IDQOcMU2m2QBBBYMCDGc2Nw/XjWsTuw3FHtB+GIes5 8FqZv4n7w8ir/g34F5joepmyZafNEqMIZe3RaA4BWCk5BMddpF+o2szsuU3j5gxL8h/r xwpozv2MHLHSUEsB1ssLT9h0Z2rY4cVKe3q0JB8UqsefB7zaOpqMDYdzyzxf9oJvQZ3b V+OP0QhIr18ujxWklQxE6DZRRh4LEm0AUVH+Sa0NFpkksgb1oPoDlDgNRksueI5pJqf1 tv3owNqIAOB1XP5OaGrBTuAqwDuUUQxxILF6ocMHfHD0RvZSkKk/1LhsB8pU3xDkP1xX +YTA== 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=2CTBSfLUop8pbmcGeoMX/FQczHPgPhXCiofRFrVGSbo=; b=omGWZNljxRElaWMs+fZ0hdWCPyiM8KbHnl7So4L6fSXYuttrrU4mI7aJDy7532Ugfh 8gQt5xxZdopUqoQaQuHjQ3FXxxMXkaaAUacPXUvOvQ/haNH7jTAOWUCIWoXbjVe4+4ub E4pbGyo5zCCmcswuX41nbwjhuH/4SM9fq4h8kVX6c0VHkpII2QTG5uaA0zGmPpb3ESaX SizzsOsvmIgiNuB/usUt9JiFIexI1cG1C2U1/2xQB3xifh6/tHEzC21pB6knevf5ROav OFkglEegSYRpx/4pLKNcyUL3GybGy0bq0PFJpqBqqQXoCwM1eqQP+o+gglh9oL+KTfwr h98w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=beOg9TUB; 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 28si1794229pgp.22.2019.08.15.06.13.06; Thu, 15 Aug 2019 06:13:23 -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=beOg9TUB; 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 S1732156AbfHONK7 (ORCPT + 99 others); Thu, 15 Aug 2019 09:10:59 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:45584 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731282AbfHONK6 (ORCPT ); Thu, 15 Aug 2019 09:10:58 -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 6291A2AF; Thu, 15 Aug 2019 15:10:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1565874656; bh=hbBpDpbfU930XiWYqzsub4i7LkoSXuNzLK98vG+7Mu8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=beOg9TUBVpvb3djnhuIIZiYyNalwjyebgK/IwdaODI6vVkptMxITGQMIUJJIocNDa Fe8yUVSJK/JC9Lx1hfFZkkvUyK0BPl/F+AJgVeYi0M0LezSZivPY16USE95osrgtIP A8eZjomz+9K2AGK+tXAEe6jpOmmVt4miunUyQMjk= Date: Thu, 15 Aug 2019 16:10:53 +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: <20190815131053.GO5011@pendragon.ideasonboard.com> References: <20190814202815.32491-1-jacopo@jmondi.org> <20190814202815.32491-3-jacopo@jmondi.org> <20190815070025.GK6133@paasikivi.fi.intel.com> <20190815125938.GI13823@pendragon.ideasonboard.com> <20190815130849.GQ6133@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190815130849.GQ6133@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 04:08:49PM +0300, Sakari Ailus wrote: > On Thu, Aug 15, 2019 at 03:59:38PM +0300, Laurent Pinchart wrote: > > 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. > > Yes. That's true. It wasn't meant for this but it's nevertheless a > convenient API to get that information, both as integer and string. But why is that needed ? The integer seems enough to me. -- Regards, Laurent Pinchart