From patchwork Fri May 8 10:01:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 3711 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 49FE7603E3 for ; Fri, 8 May 2020 11:58:55 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id D5E95FF806; Fri, 8 May 2020 09:58:52 +0000 (UTC) From: Jacopo Mondi To: linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), libcamera-devel@lists.libcamera.org, Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Laurent Pinchart Cc: Jacopo Mondi , tfiga@google.com, pavel@ucw.cz Date: Fri, 8 May 2020 12:01:45 +0200 Message-Id: <20200508100158.3437161-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v10 00/13] media: report camera properties X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 09:58:55 -0000 Hello, this v10 is not just a rename s/location/orientation as the documentation around the property has changed slightly as well and should probably be re-read. Anyway, most notable change is indeed the usa of 'orientation' in place of location, so that we have an 'orientation' DT property, a V4L2_CID_CAMERA_ORIENTATION control id and V4L2_ORIENTATION_* control values. A new patch 'dt-bindings: Add media properties' add an header to help DT users by providing macros for the currently supported locations. I've added a patch for a new sensor driver I have used for testing (imx219) and made the V4L2_CID_CAMERA_ORIENTATION a menu control as it was meant to be. I know the additional DT header could slow the series inclusion, I'm fine leaving it out if it proves controversial. The result of the two new controls inspected with v4l2-ctl -L for a camera with EXTERNAL orientation and 180 degrees rotation is the following: ------------------------------------------------------------------------------------------------------------------ Camera Controls camera_orientation 0x009a0922 (menu) : min=0 max=2 default=2 value=2 flags=read-only 0: Front Camera 1: Back Camera 2: External Camera camera_sensor_rotation 0x009a0923 (int) : min=180 max=180 step=1 default=180 value=180 flags=read-only ------------------------------------------------------------------------------------------------------------------ Thanks j v9->v10: - s/location/orientation and documentation update - Add DT bindings header for media properties - Make V4L2_CID_CAMERA_ORIENTATION a TYPE_MENU control - Add patch for imx219 v8->v9: - Rebased on media master which has moved media documentation v7->v8: - Add Rob's ack to 03/11 - Address Hans typographical comments in 03/11 Jacopo Mondi (13): dt-bindings: video-interfaces: Document 'orientation' property dt-bindings: video-interface: Replace 'rotation' description dt-bindings: Add media properties media: v4l2-ctrl: Document V4L2_CID_CAMERA_ORIENTATION media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATION media: v4l2-ctrls: Add camera orientation and rotation media: v4l2-fwnode: Add helper to parse device properties include: v4l2-ctrl: Sort forward declarations media: v4l2-ctrls: Sort includes alphabetically media: v4l2-ctrls: Add helper to register properties media: i2c: ov5670: Parse and register properties media: i2c: ov13858: Parse and register properties media: i2c: imx219: Parse and register properties .../bindings/media/video-interfaces.txt | 372 +++++++++++++++++- .../media/v4l/ext-ctrls-camera.rst | 151 +++++++ drivers/media/i2c/imx219.c | 12 +- drivers/media/i2c/ov13858.c | 13 +- drivers/media/i2c/ov5670.c | 14 +- drivers/media/v4l2-core/v4l2-ctrls.c | 63 ++- drivers/media/v4l2-core/v4l2-fwnode.c | 42 ++ include/dt-bindings/media/video-interfaces.h | 15 + include/media/v4l2-ctrls.h | 34 +- include/media/v4l2-fwnode.h | 47 +++ include/uapi/linux/v4l2-controls.h | 7 + 11 files changed, 755 insertions(+), 15 deletions(-) create mode 100644 include/dt-bindings/media/video-interfaces.h --- 2.26.1