I'm still very unhappy with having all this in various drivers. There's a lot of code that can be turned into generic library functions, and even more code that could be made generic with some amount of refactoring.