Hi,
just install the linux source code (which you can find at
kernel.org) and you have all the source code you need.
Then start looking at the usb-core and usb-hid files.
Also search for the book Linux Device Drivers 3th edition by Greg Kroah-Hartman, Jon Corbet and Alessandro Rubini .
Cheers