you'll want to investigate IOKit, probably, and I'm not sure if the linux device drivers will be much help... if you're serious and have some experience in this sort of thing, join darwin-development@lists.apple.com, but if you're not a C master, I wouldn't recommend trying this to start off with
