drivers/dio/dio-driver.c
Source file repositories/reference/linux-study-clean/drivers/dio/dio-driver.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dio/dio-driver.c- Extension
.c- Size
- 3503 bytes
- Lines
- 143
- Domain
- Driver Families
- Bucket
- drivers/dio
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hlinux/dio.h
Detected Declarations
function Copyrightfunction dio_device_probefunction dio_register_driverfunction removefunction dio_bus_matchfunction dio_driver_initexport dio_register_driverexport dio_unregister_driverexport dio_bus_type
Annotated Snippet
static int dio_bus_match(struct device *dev, const struct device_driver *drv)
{
struct dio_dev *d = to_dio_dev(dev);
const struct dio_driver *dio_drv = to_dio_driver(drv);
const struct dio_device_id *ids = dio_drv->id_table;
if (!ids)
return 0;
return dio_match_device(ids, d) ? 1 : 0;
}
const struct bus_type dio_bus_type = {
.name = "dio",
.match = dio_bus_match,
.probe = dio_device_probe,
};
static int __init dio_driver_init(void)
{
return bus_register(&dio_bus_type);
}
postcore_initcall(dio_driver_init);
EXPORT_SYMBOL(dio_register_driver);
EXPORT_SYMBOL(dio_unregister_driver);
EXPORT_SYMBOL(dio_bus_type);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/dio.h`.
- Detected declarations: `function Copyright`, `function dio_device_probe`, `function dio_register_driver`, `function remove`, `function dio_bus_match`, `function dio_driver_init`, `export dio_register_driver`, `export dio_unregister_driver`, `export dio_bus_type`.
- Atlas domain: Driver Families / drivers/dio.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.