From patchwork Tue Dec 15 00:48:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10665 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6F0AFBD80A for ; Tue, 15 Dec 2020 00:48:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4C375615D5; Tue, 15 Dec 2020 01:48:29 +0100 (CET) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FA2F61590 for ; Tue, 15 Dec 2020 01:48:27 +0100 (CET) X-Halon-ID: 3d4daf92-3e6f-11eb-a076-005056917f90 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 3d4daf92-3e6f-11eb-a076-005056917f90; Tue, 15 Dec 2020 01:48:26 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org, naush@raspberrypi.com Date: Tue, 15 Dec 2020 01:48:08 +0100 Message-Id: <20201215004811.602429-6-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201215004811.602429-1-niklas.soderlund@ragnatech.se> References: <20201215004811.602429-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor: Expose the camera device 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Expose the device backing the CameraSensor instance. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- * Changes since v3 - New, needed to be able to move the DelayedControls handling out of CameraSensor. --- include/libcamera/internal/camera_sensor.h | 2 ++ src/libcamera/camera_sensor.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index f80d836161a564e7..a70e024aa327f69b 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -61,6 +61,8 @@ public: ControlList getControls(const std::vector &ids); int setControls(ControlList *ctrls); + V4L2Subdevice *device() { return subdev_.get(); } + const ControlList &properties() const { return properties_; } int sensorInfo(CameraSensorInfo *info) const; diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 1628ba9c892b0eaf..df45b2b803617bfd 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector &ids) return subdev_->getControls(ids); } +/** + * \fn CameraSensor::device() + * \brief Retrieve the camera sensor device + * \return The camera sensor device + */ + /** * \fn CameraSensor::properties() * \brief Retrieve the camera sensor properties