drivers/bus/mhi/host/pci_generic.c
Source file repositories/reference/linux-study-clean/drivers/bus/mhi/host/pci_generic.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/bus/mhi/host/pci_generic.c- Extension
.c- Size
- 54163 bytes
- Lines
- 1763
- Domain
- Driver Families
- Bucket
- drivers/bus
- 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/delay.hlinux/device.hlinux/mhi.hlinux/module.hlinux/pci.hlinux/pm_runtime.hlinux/timer.hlinux/workqueue.h
Detected Declarations
struct mhi_pci_dev_infostruct mhi_pci_deviceenum mhi_pci_device_statusfunction mhi_pci_read_regfunction mhi_pci_write_regfunction mhi_pci_status_cbfunction mhi_pci_wake_get_nopfunction mhi_pci_claimfunction mhi_pci_get_irqsfunction mhi_pci_runtime_getfunction mhi_pci_runtime_putfunction mhi_pci_recovery_workfunction health_checkfunction mhi_pci_generic_edl_triggerfunction mhi_pci_probefunction mhi_pci_removefunction mhi_pci_shutdownfunction mhi_pci_reset_preparefunction mhi_pci_reset_donefunction mhi_pci_error_detectedfunction mhi_pci_slot_resetfunction mhi_pci_io_resumefunction mhi_pci_runtime_suspendfunction mhi_pci_runtime_resumefunction mhi_pci_suspendfunction mhi_pci_resumefunction mhi_pci_freezefunction mhi_pci_restore
Annotated Snippet
static struct pci_driver mhi_pci_driver = {
.name = "mhi-pci-generic",
.id_table = mhi_pci_id_table,
.probe = mhi_pci_probe,
.remove = mhi_pci_remove,
.shutdown = mhi_pci_shutdown,
.err_handler = &mhi_pci_err_handler,
.driver.pm = &mhi_pci_pm_ops,
.sriov_configure = pci_sriov_configure_simple,
};
module_pci_driver(mhi_pci_driver);
MODULE_AUTHOR("Loic Poulain <loic.poulain@linaro.org>");
MODULE_DESCRIPTION("Modem Host Interface (MHI) PCI controller driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/mhi.h`, `linux/module.h`, `linux/pci.h`, `linux/pm_runtime.h`, `linux/timer.h`, `linux/workqueue.h`.
- Detected declarations: `struct mhi_pci_dev_info`, `struct mhi_pci_device`, `enum mhi_pci_device_status`, `function mhi_pci_read_reg`, `function mhi_pci_write_reg`, `function mhi_pci_status_cb`, `function mhi_pci_wake_get_nop`, `function mhi_pci_claim`, `function mhi_pci_get_irqs`, `function mhi_pci_runtime_get`.
- Atlas domain: Driver Families / drivers/bus.
- 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.