|
My Kernel v0.1.0
|
The basic device driver structure. More...
#include <driver.h>
Data Structures | |
| struct | driver_operations |
| Vector table of the common operations used to control drivers. More... | |
Data Fields | |
| node_t | this |
| Intrusive list node used to iterate through loaded drivers. | |
| const char * | name |
| The name of the driver. | |
| struct device_driver::driver_operations | operations |
| Vector table of driver control operations. | |
This structure defines the common base interface used to enumerate and interact with all device drivers. It should be embedded inside a more specific 'per-bus' struct, and interacted with through the bus's API.
Example:
To interact with a pci_device, we will interact with the pci_* functions. These functions will be the one to interact with the driver_* api instead, adding into the process the steps/configuration necessary for PCI devices to work.