Comedi is a Linux COntrol and MEasurement Device Interface. We use Comedi in our lab to contol experiments via a NI PCI-6052E. The basic architecture for a Comedi application is:

kernel space   |   user space
device         |
  |            |
kernel --------|-- libcomedi - application
  |            |
comedi module  |

To make matters more complicated, there are two version of the kernel module, one in Git at and another in the kernel itself.

Luckily, many distributions now package versions of the in-kernel staging driver (e.g. Debian and Ubuntu). I was feeling left out on Gentoo, so I've just revived the old Gentoo packages and added them to my Gentoo overlay.