Dennis's `The UNIX I/O System' paper in Volume 2 of the 7/e
manual is basically about how drivers work. Is that near
enough, possibly as augmented by Ken's `UNIX Implementation'
paper in the same book?
Those were my own starting point, long ago, for understanding
how to write device drivers. Along with existing source code
as examples, of course, but (unlikely many who hack on device
drivers, I'm afraid) I have always preferred to have a proper
statement of rules, conventions, and interfaces rather than
just reading code and guessing.
Norman Wilson
Toronto ON