drivers/misc/cb710/core.c
Source file repositories/reference/linux-study-clean/drivers/misc/cb710/core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/cb710/core.c- Extension
.c- Size
- 7795 bytes
- Lines
- 328
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/pci.hlinux/spinlock.hlinux/idr.hlinux/cb710.hlinux/gfp.h
Detected Declarations
function cb710_pci_update_config_regfunction cb710_pci_configurefunction cb710_irq_handlerfunction cb710_release_slotfunction cb710_register_slotfunction cb710_unregister_slotfunction cb710_set_irq_handlerfunction cb710_suspendfunction cb710_resumefunction cb710_probefunction cb710_remove_onefunction cb710_init_modulefunction cb710_cleanup_modulemodule init cb710_init_moduleexport cb710_pci_update_config_regexport cb710_set_irq_handler
Annotated Snippet
static struct pci_driver cb710_driver = {
.name = KBUILD_MODNAME,
.id_table = cb710_pci_tbl,
.probe = cb710_probe,
.remove = cb710_remove_one,
.driver.pm = &cb710_pm_ops,
};
static int __init cb710_init_module(void)
{
return pci_register_driver(&cb710_driver);
}
static void __exit cb710_cleanup_module(void)
{
pci_unregister_driver(&cb710_driver);
ida_destroy(&cb710_ida);
}
module_init(cb710_init_module);
module_exit(cb710_cleanup_module);
MODULE_AUTHOR("Michał Mirosław <mirq-linux@rere.qmqm.pl>");
MODULE_DESCRIPTION("ENE CB710 memory card reader driver");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, cb710_pci_tbl);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/spinlock.h`, `linux/idr.h`, `linux/cb710.h`, `linux/gfp.h`.
- Detected declarations: `function cb710_pci_update_config_reg`, `function cb710_pci_configure`, `function cb710_irq_handler`, `function cb710_release_slot`, `function cb710_register_slot`, `function cb710_unregister_slot`, `function cb710_set_irq_handler`, `function cb710_suspend`, `function cb710_resume`, `function cb710_probe`.
- Atlas domain: Driver Families / drivers/misc.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.