From patchwork Tue Feb 18 11:27:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2853 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C78B61F56 for ; Tue, 18 Feb 2020 12:25:17 +0100 (CET) X-Originating-IP: 93.34.114.233 Received: from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D83C260008; Tue, 18 Feb 2020 11:25:16 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 18 Feb 2020 12:27:49 +0100 Message-Id: <20200218112752.3910410-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218112752.3910410-1-jacopo@jmondi.org> References: <20200218112752.3910410-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 4/7] libcamera: sensor: Add OV5670 camera sensor 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: Tue, 18 Feb 2020 11:25:17 -0000 Add OV5670CameraSensor class to handle Omnivision OV5670 image sensor and register it to the camera sensor factory. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/meson.build | 1 + src/libcamera/sensor/meson.build | 3 +++ src/libcamera/sensor/ov5670.cpp | 39 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 src/libcamera/sensor/meson.build create mode 100644 src/libcamera/sensor/ov5670.cpp diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index ecc5b5fe4023..7dd7358b174e 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -58,6 +58,7 @@ includes = [ subdir('pipeline') subdir('proxy') +subdir('sensor') libudev = dependency('libudev', required : false) diff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build new file mode 100644 index 000000000000..7af70370cf5c --- /dev/null +++ b/src/libcamera/sensor/meson.build @@ -0,0 +1,3 @@ +libcamera_sources += files([ + 'ov5670.cpp', +]) diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp new file mode 100644 index 000000000000..407a0d2967ae --- /dev/null +++ b/src/libcamera/sensor/ov5670.cpp @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * ov5670.cpp - OV5670 camera sensor + */ + +#include "camera_sensor.h" + +/** + * \file ov5670.cpp + * \brief Omnivision OV5670 image sensor + */ + +namespace libcamera { + +class OV5670 final : public CameraSensor +{ +public: + OV5670(const MediaEntity *entity); +}; + +/** + * \class OV5670 + * \brief Camera sensor class for Omnivision OV5670 image sensor + */ + +/** + * \brief Construct the ov5670 sensor class + * \param[in] entity The media entity representing the sensor + */ +OV5670::OV5670(const MediaEntity *entity) + : CameraSensor(entity) +{ +} + +REGISTER_CAMERA_SENSOR(OV5670, "ov5670"); + +}; /* namespace libcamera */