Skip to contentSkip to conversation

v4l2-pci-skeleton: add a V4L2 PCI skeleton driver

RFC PATCH New Hans Verkuil 1 participant 1 message Jan 26, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 v4l2-pci-skeleton: add a V4L2 PCI skeleton driver

I will be giving a presentation about the V4L2 frameworks during FOSDEM 2014. While working on that presentation I thought it would be very useful to actually show some code, so I put together this V4L2 PCI skeleton driver that can function as the starting point for a new PCI driver. It is completely up to date as far as frameworks is concerned.

This is the first version of such a driver. I plan to extend it to include sub-devices. I also plan to create a USB skeleton driver. Although if someone else would be interested in doing that, that would be nice. I'm not sure how much time I can actually spend on a USB skeleton driver.

---
 drivers/media/pci/Kconfig                      |   1 +
 drivers/media/pci/Makefile                     |   2 +
 drivers/media/pci/skeleton/Kconfig             |  10 +
 drivers/media/pci/skeleton/Makefile            |   1 +
 drivers/media/pci/skeleton/v4l2-pci-skeleton.c | 882 +++++++++++++++++++++++++
 5 files changed, 896 insertions(+)
 create mode 100644 drivers/media/pci/skeleton/Kconfig
 create mode 100644 drivers/media/pci/skeleton/Makefile
 create mode 100644 drivers/media/pci/skeleton/v4l2-pci-skeleton.c
drivers/media/pci/Kconfig +1 -0
index 53196f1..1717a91 100644
@@ -19,6 +19,7 @@ if MEDIA_ANALOG_TV_SUPPORT
 source "drivers/media/pci/ivtv/Kconfig"
 source "drivers/media/pci/zoran/Kconfig"
 source "drivers/media/pci/saa7146/Kconfig"
+source "drivers/media/pci/skeleton/Kconfig"
 endif
 
 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
drivers/media/pci/Makefile +2 -0
index 35cc578..ec08f46 100644
@@ -11,11 +11,13 @@ obj-y        +=	ttpci/		\
 		ngene/		\
 		ddbridge/	\
 		b2c2/		\
+		skeleton/	\
 		saa7146/
 
 obj-$(CONFIG_VIDEO_IVTV) += ivtv/
 obj-$(CONFIG_VIDEO_ZORAN) += zoran/
 obj-$(CONFIG_VIDEO_CX18) += cx18/
+obj-$(CONFIG_VIDEO_PCI_SKELETON) += skeleton/
 obj-$(CONFIG_VIDEO_CX23885) += cx23885/
 obj-$(CONFIG_VIDEO_CX25821) += cx25821/
 obj-$(CONFIG_VIDEO_CX88) += cx88/
drivers/media/pci/skeleton/Kconfig new file +10 -0
new file mode 100644
index 0000000..f804955
@@ -0,0 +1,10 @@
+config VIDEO_PCI_SKELETON
+	tristate "V4L2 PCI Skeleton Driver"
+	select VIDEOBUF2_DMA_CONTIG
+	depends on PCI && VIDEO_V4L2
+	help
+	  Say Y for support for this PCI Skeleton Driver capture
+	  device.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called v4l2-pci-skeleton.
drivers/media/pci/skeleton/Makefile new file +1 -0
new file mode 100644
index 0000000..3a935ca
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l2-pci-skeleton.o
drivers/media/pci/skeleton/v4l2-pci-skeleton.c new file +882 -0

882 lines not on this page · raw message

Signature · 1 line
1.8.5.2