drivers/mfd/ls2k-bmc-core.c
Source file repositories/reference/linux-study-clean/drivers/mfd/ls2k-bmc-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/ls2k-bmc-core.c- Extension
.c- Size
- 15908 bytes
- Lines
- 515
- Domain
- Driver Families
- Bucket
- drivers/mfd
- 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.
- 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/aperture.hlinux/bitfield.hlinux/delay.hlinux/errno.hlinux/init.hlinux/iopoll.hlinux/kbd_kern.hlinux/kernel.hlinux/mfd/core.hlinux/module.hlinux/pci.hlinux/pci_ids.hlinux/platform_data/simplefb.hlinux/platform_device.hlinux/stop_machine.hlinux/vt_kern.h
Detected Declarations
struct ls2k_bmc_pci_datastruct ls2k_bmc_bridge_pci_datastruct ls2k_bmc_ddatafunction ls2k_bmc_bar0_addr_is_setfunction ls2k_bmc_pcie_is_connectedfunction ls2k_bmc_restore_bridge_pci_datafunction ls2k_bmc_recover_pci_datafunction ls2k_bmc_events_fnfunction ls2k_bmc_interruptfunction devicefunction ls2k_bmc_initfunction ls2k_bmc_parse_modefunction ls2k_bmc_probe
Annotated Snippet
static struct pci_driver ls2k_bmc_driver = {
.name = "ls2k-bmc",
.id_table = ls2k_bmc_devices,
.probe = ls2k_bmc_probe,
};
module_pci_driver(ls2k_bmc_driver);
MODULE_DESCRIPTION("Loongson-2K Board Management Controller (BMC) Core driver");
MODULE_AUTHOR("Loongson Technology Corporation Limited");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/bitfield.h`, `linux/delay.h`, `linux/errno.h`, `linux/init.h`, `linux/iopoll.h`, `linux/kbd_kern.h`, `linux/kernel.h`.
- Detected declarations: `struct ls2k_bmc_pci_data`, `struct ls2k_bmc_bridge_pci_data`, `struct ls2k_bmc_ddata`, `function ls2k_bmc_bar0_addr_is_set`, `function ls2k_bmc_pcie_is_connected`, `function ls2k_bmc_restore_bridge_pci_data`, `function ls2k_bmc_recover_pci_data`, `function ls2k_bmc_events_fn`, `function ls2k_bmc_interrupt`, `function device`.
- Atlas domain: Driver Families / drivers/mfd.
- Implementation status: pattern implementation candidate.
- 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.