From patchwork Tue Jan 15 23:19:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 244 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E7EE60C6A for ; Wed, 16 Jan 2019 00:19:14 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8AE33530; Wed, 16 Jan 2019 00:19:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547594353; bh=zeccjv/jnIuYpfgBPDno2OBz/4DTaIGfW0hgDNCqunA=; h=From:To:Cc:Subject:Date:From; b=aTwIpM19T7bWJKY0lWpn1XRne4VImvCp/LIcfNKGi8Dg63uDIkgbNJ1mldt4o+nkZ FSeiU/45PZGeReF8ZT0wZ53CQJbPe7J8S+Tze7LITmmZclegco6Gsmk+zxr5hYGww2 9ipKYCyYPgXmtqQTa9/1FyEvidRNQlAFZQ/hDyAU= From: Kieran Bingham To: LibCamera Devel Date: Tue, 15 Jan 2019 23:19:06 +0000 Message-Id: <20190115231909.19893-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH v3 0/3] V4L2Device: Add basic V4L2 support class 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: Tue, 15 Jan 2019 23:19:14 -0000 Define the beginnings of a V4L2 device management object. This basic class supports opening the device and parsing the device capabilities including obtaining the driver and device (card) name. The capabilities are validated to ensure that the device is a capture device and supports the Streaming IO ioctls. This series imports the linux/videodev2.h from kernel version v4.19. Kieran Bingham (3): include: linux: Import videodev2.h from Linux v4.19 libcamera: Add V4L2 Device object test: v4l2_device: Add test suite and initial test include/linux/videodev2.h | 2412 +++++++++++++++++++++++++ src/libcamera/include/v4l2_device.h | 45 + src/libcamera/meson.build | 2 + src/libcamera/v4l2_device.cpp | 150 ++ test/meson.build | 1 + test/v4l2_device/double_open.cpp | 38 + test/v4l2_device/meson.build | 12 + test/v4l2_device/v4l2_device_test.cpp | 43 + test/v4l2_device/v4l2_device_test.h | 27 + 9 files changed, 2730 insertions(+) create mode 100644 include/linux/videodev2.h create mode 100644 src/libcamera/include/v4l2_device.h create mode 100644 src/libcamera/v4l2_device.cpp create mode 100644 test/v4l2_device/double_open.cpp create mode 100644 test/v4l2_device/meson.build create mode 100644 test/v4l2_device/v4l2_device_test.cpp create mode 100644 test/v4l2_device/v4l2_device_test.h