From patchwork Sun Jun 2 13:04:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1330 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B1F8460BFA for ; Sun, 2 Jun 2019 15:03:44 +0200 (CEST) Received: from uno.homenet.telecomitalia.it (unknown [79.35.79.123]) (Authenticated sender: jacopo@jmondi.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 17E55100005; Sun, 2 Jun 2019 13:03:43 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sun, 2 Jun 2019 15:04:30 +0200 Message-Id: <20190602130435.18780-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190602130435.18780-1-jacopo@jmondi.org> References: <20190602130435.18780-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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: Sun, 02 Jun 2019 13:03:44 -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;