Chapter 2. Device drivers infrastructure
The Basic Device Driver-Model Structures
- struct bus_type —
The bus type of the device
- enum probe_type —
device driver probe type to try Device drivers may opt in for special handling of their respective probe routines. This tells the core what to expect and prefer.
- struct device_driver —
The basic device driver structure
- struct subsys_interface —
interfaces to device functions
- struct class —
device classes
- struct device —
The basic device structure
- module_driver —
Helper macro for drivers that don't do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces
module_init
and module_exit
.
- builtin_driver
Helper macro for drivers that don't do anything special in init and have no exit. This eliminates some boilerplate. Each driver may only use this macro once, and calling it replaces device_initcall (or in some cases, the legacy __initcall). This is meant to be a direct parallel of module_driver above but without the __exit stuff that is not used for builtin cases.