As the first step, include the header files for the DKI and DDI APIs involved in the device driver's implementation. A device driver mainly uses its parent bus DDI API (and some generic DKI services like memory allocator).
The driver implementation must include:
The parent bus class API header file(s) (DKI and DDI) used by the driver.
Note that the services defined in these header files are those available to the writer to implement its device driver.
The device class API header file(s) (DDI).
Note that these header files define the sets of routines that have to be written in the driver component, to be compliant with the Driver Framework.
Here is an example for a NS16x50 compatible UART device driver that uses DKI and "Common bus driver" APIs, and provides "UART device driver" DDI API.
#include <dki/dki.h> #include <ddi/bus/bus.h> #include <ddi/uart/uart.h> ... #include "ns16550.h" #include "ns16650Prop.h"