drivers/misc/keba/cp500.c
Source file repositories/reference/linux-study-clean/drivers/misc/keba/cp500.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/keba/cp500.c- Extension
.c- Size
- 25336 bytes
- Lines
- 990
- 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/device.hlinux/i2c.hlinux/misc/keba.hlinux/module.hlinux/mtd/partitions.hlinux/nvmem-consumer.hlinux/nvmem-provider.hlinux/pci.hlinux/spi/flash.hlinux/spi/spi.h
Detected Declarations
struct cp500_dev_infostruct cp500_devsstruct cp500_nvmemstruct cp500function cp500_get_fpga_versionfunction version_showfunction keep_cfg_showfunction keep_cfg_storefunction cp500_i2c_releasefunction cp500_register_i2cfunction cp500_spi_releasefunction cp500_register_spifunction cp500_fan_releasefunction cp500_register_fanfunction cp500_batt_releasefunction cp500_register_battfunction cp500_uart_releasefunction cp500_register_uartfunction cp500_nvmem_readfunction cp500_nvmem_writefunction cp500_nvmem_registerfunction cp500_nvmem_unregisterfunction cp500_nvmem_matchfunction cp500_nvmemfunction cp500_register_auxiliary_devsfunction cp500_unregister_devfunction cp500_unregister_auxiliary_devsfunction cp500_axi_handlerfunction cp500_enablefunction cp500_disablefunction cp500_probefunction cp500_remove
Annotated Snippet
static struct pci_driver cp500_driver = {
.name = CP500,
.id_table = cp500_ids,
.probe = cp500_probe,
.remove = cp500_remove,
.dev_groups = cp500_groups,
};
module_pci_driver(cp500_driver);
MODULE_AUTHOR("Gerhard Engleder <eg@keba.com>");
MODULE_DESCRIPTION("KEBA CP500 system FPGA driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/device.h`, `linux/i2c.h`, `linux/misc/keba.h`, `linux/module.h`, `linux/mtd/partitions.h`, `linux/nvmem-consumer.h`, `linux/nvmem-provider.h`, `linux/pci.h`.
- Detected declarations: `struct cp500_dev_info`, `struct cp500_devs`, `struct cp500_nvmem`, `struct cp500`, `function cp500_get_fpga_version`, `function version_show`, `function keep_cfg_show`, `function keep_cfg_store`, `function cp500_i2c_release`, `function cp500_register_i2c`.
- 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.