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.

Dependency Surface

Detected Declarations

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

Implementation Notes