drivers/tc/tc-driver.c
Source file repositories/reference/linux-study-clean/drivers/tc/tc-driver.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tc/tc-driver.c- Extension
.c- Size
- 3026 bytes
- Lines
- 110
- Domain
- Driver Families
- Bucket
- drivers/tc
- 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/tc.h
Detected Declarations
function Copyrightfunction removefunction tc_bus_matchfunction tc_driver_initexport tc_register_driverexport tc_unregister_driverexport tc_bus_type
Annotated Snippet
static int tc_bus_match(struct device *dev, const struct device_driver *drv)
{
struct tc_dev *tdev = to_tc_dev(dev);
const struct tc_driver *tdrv = to_tc_driver(drv);
const struct tc_device_id *id;
id = tc_match_device(tdrv, tdev);
if (id)
return 1;
return 0;
}
const struct bus_type tc_bus_type = {
.name = "tc",
.match = tc_bus_match,
};
EXPORT_SYMBOL(tc_bus_type);
static int __init tc_driver_init(void)
{
return bus_register(&tc_bus_type);
}
postcore_initcall(tc_driver_init);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/tc.h`.
- Detected declarations: `function Copyright`, `function remove`, `function tc_bus_match`, `function tc_driver_init`, `export tc_register_driver`, `export tc_unregister_driver`, `export tc_bus_type`.
- Atlas domain: Driver Families / drivers/tc.
- 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.