Getting started writing a mouse driver.

I'd like to get started writing a mouse driver for Linux and I'm not sure how to get started on this project. I realize that there is a lot of documentation on this, and it's going to take some time on my part just understanding the code, but I think my question really is " How much do I need to know about the mouse I'm writing the driver for, where do I look up documentation for doing something like this as far as the device information goes." I'm not looking to do anything fancy, I just want to re invent the wheel, using the wheel as a reference. I'm using a logitech M305 at the moment, that's a wireless USB mouse, I don't think the fact that it's wireless would change anything as far as writing the driver for it goes. What do you guys think would be the best approach for a person who has no previous experience in writing a driver of any kind.
closed account (S6k9GNh0)
Read a book. There are quite a few. Even the outdated ones somewhat pertain to the modern kernel (except for a few subtle changes which tend to be obvious or easy to google).

<rant>
Also, I plan on doing this soon so I can maybe tap into the power of my Razr Naga. It pisses me off quite a bit of the low quality design the driver software and firmware has, i.e. profiles aren't stored on the mouse thus can't be used on Linux since Linux isn't supported. Also requires registration on their server which is 100% garbage. I'll have to friggin' reverse engineer the online-only Synapse 2.0 session... to use my mouse. This will be my last Razr mouse ever.
</rant>
Last edited on
Topic archived. No new replies allowed.