From patchwork Mon Jun 10 16:40:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1382 Return-Path: Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 24C51635DC for ; Mon, 10 Jun 2019 18:39:46 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id B4ADD240007; Mon, 10 Jun 2019 16:39:45 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 10 Jun 2019 18:40:47 +0200 Message-Id: <20190610164052.30741-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190610164052.30741-1-jacopo@jmondi.org> References: <20190610164052.30741-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/6] libcamera: camera_sensor: Add dev() operation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 16:39:46 -0000 Add dev() operation to the CameraSensor class to access the V4L2Subdevice backing the camera sensor. Signed-off-by: Jacopo Mondi --- src/libcamera/camera_sensor.cpp | 6 ++++++ src/libcamera/include/camera_sensor.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 2b9d8fa593c1..8cbef8bccbef 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -130,6 +130,12 @@ int CameraSensor::init() * \return The sensor media entity */ +/** + * \fn CameraSensor::dev() + * \brief Retrieve the sensor V4L2 subdevice + * \return The sensor V4L2 subdevice + */ + /** * \fn CameraSensor::mbusCodes() * \brief Retrieve the media bus codes supported by the camera sensor diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h index b823480241a7..6cdf833a27bf 100644 --- a/src/libcamera/include/camera_sensor.h +++ b/src/libcamera/include/camera_sensor.h @@ -33,6 +33,7 @@ public: int init(); const MediaEntity *entity() const { return entity_; } + V4L2Subdevice *dev() const { return subdev_; } const std::vector &mbusCodes() const { return mbusCodes_; } const std::vector &sizes() const { return sizes_; } const Size &resolution() const;