Let me present v4l2-vcam:
https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/?h=vcamVcam user driver is created by opening /dev/vcam and then issuing V4L2_VCAM_IOC_NEW. This will emit /dev/videoX for readers. Reader semantics enforces single reader limitation.
In addition:
1. Supports zero-copy operation for a shared capture and output buffer (enabled automatically when possible).
2. Uses DMA contig allocator automatically when possible (falls back to vmalloc).
3. VB2 framework used for the pipeline.
These all are BTW unresolved in the OOT driver, and should help with getting better picture and frame rates over what we can do outside of kernel.
The code will code about 777 rounds of cleanups and tweaks and then I'll send the RFC patch ;-)