The device driver architecture uses an abstraction layer for devices and interfaces.
The interfaces abstraction layer is somewhat useful for easily using the same protocol across many different interfaces.
The device layer is not very useful and very confusing for non initiated programmer.
The issue is for rethinking the way this abstraction is done.
try looking at existing implementations of such a system -> Linux, chibiOS, etc to find some inspiration