I'm just getting into driver writing myself, but you might find these links useful:
http://lwn.net/Kernel/LDD3/
http://www.freesoftwaremagazine.com/.../drivers_linux
Again, I'm a newbie at drivers, but I think you might want to use whats called a character driver. Take a look at the "
memory" driver example (it starts at the bottom of page where it says:
The complete driver “memory”: initial part of the driver). Basically, the tutorial will teach you how to write a driver that you can open and read/write too via
C functions.