Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2290658ybl; Thu, 15 Aug 2019 09:25:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnEVrf6QJ83YM9m5FyUFKScxhClgpWGLra0StBT0aWLFLu9hnCfPqvP/oN3uFCMsy5oQNE X-Received: by 2002:a05:6a00:8e:: with SMTP id c14mr6074127pfj.241.1565886336687; Thu, 15 Aug 2019 09:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565886336; cv=none; d=google.com; s=arc-20160816; b=T97HU3APxf9V/317cJbXWBjBsAdTvJgizgdM0ygShdHWRotmunQpo4wFCxKlq2guZ1 WGn4YCYJetvf0sIpQRMPUxvWIfnREhqBvdpi2FowzZk5wv0S8Qyz14xBcYq3JYXiSwL1 r83Yeh/izITUpxaC+LEnxFEmSAFh/lhpqCYlAcXZqXiuTku/AHyQNvBAf1wyUSm4lNy+ PdhHKUZkPGb4q+jiHZFeEmFiEr0xTroskqogAfCEp800jhuwEpxVu4HCys6hLEA+dNY2 ZSgE9gXbntXRPZ5+XoTimMfjfHkGkzPDTSt1hxc50HRMuo2JrBVaZEZ/U5RD0G7VaWPQ YC9A== 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; bh=SuFQi1v7H3LQ3BbfMKRTErhFn21xa12JEcYAWaU/WT0=; b=kRR2h2YQRKR9WRjHenZbgFVtHy1cm2mD2VlDl48LNgQhukX+AJfJ8VYLBPbhwhfAu+ 9+2lsHqZLxLvBXYXhFhGozpM2mSvXRly0PTKIubTfRvJnexW5rkx22OmB7tYL6iOYq1r diU8n9Oe6OFBU9458Ip1fJZfRJKjwNKK79gLE5rTkelYs18ktfeJ7MBwniEpWf5S8E4j hBZk9zLG0B9tbaIjA/iExyN+NCxX1hZmt0sf20BAx4h/YteEWsp0IaZJmPtPxJT4IHGt z8RCrqtdIIfs8hhItUh4eJGYOWOYg9SEcH1XpBHfzDkYsiCUJXLs/aFZcu/ZeRXCa9s9 LQQA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si2370740pfe.271.2019.08.15.09.25.21; Thu, 15 Aug 2019 09:25:36 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732196AbfHONQT (ORCPT + 99 others); Thu, 15 Aug 2019 09:16:19 -0400 Received: from mga11.intel.com ([192.55.52.93]:2618 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732122AbfHONQS (ORCPT ); Thu, 15 Aug 2019 09:16:18 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 06:16:18 -0700 X-IronPort-AV: E=Sophos;i="5.64,389,1559545200"; d="scan'208";a="352232130" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 06:16:16 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 1D424206FD; Thu, 15 Aug 2019 16:15:10 +0300 (EEST) Date: Thu, 15 Aug 2019 16:15:10 +0300 From: Sakari Ailus To: Laurent Pinchart 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: <20190815131509.GR6133@paasikivi.fi.intel.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> <20190815131053.GO5011@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190815131053.GO5011@pendragon.ideasonboard.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 On Thu, Aug 15, 2019 at 04:10:53PM +0300, Laurent Pinchart wrote: > 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. Because it's a qualitative control, not a quantitative one. -- Sakari Ailus sakari.ailus@linux.intel.com