If you've been experimenting with the idea of writing device drivers for Linux, Free Software Magazine has written an extensive article on this topic. The article starts with the differences between kernel-space and user-space components and then ends with using LEDs connected to a parallel port as the device. This how-to guide can be read here.