drivers/i2c/busses/i2c-designware-pcidrv.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-designware-pcidrv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-designware-pcidrv.c- Extension
.c- Size
- 10258 bytes
- Lines
- 389
- Domain
- Driver Families
- Bucket
- drivers/i2c
- 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.
- 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/err.hlinux/errno.hlinux/i2c.hlinux/interrupt.hlinux/io.hlinux/kernel.hlinux/module.hlinux/pci.hlinux/pm.hlinux/pm_runtime.hlinux/power_supply.hlinux/sched.hlinux/slab.hi2c-designware-core.hi2c-ccgx-ucsi.h
Detected Declarations
struct dw_scl_sda_cfgstruct dw_pci_controllerenum dw_pci_ctl_id_tfunction mfld_get_clk_rate_khzfunction mfld_setupfunction mrfld_setupfunction ehl_get_clk_rate_khzfunction navi_amd_get_clk_rate_khzfunction navi_amd_setupfunction i2c_dw_pci_probefunction i2c_dw_pci_removefunction i2c_dw_pci_shutdown
Annotated Snippet
static struct pci_driver dw_i2c_driver = {
.name = DRIVER_NAME,
.probe = i2c_dw_pci_probe,
.remove = i2c_dw_pci_remove,
.shutdown = i2c_dw_pci_shutdown,
.driver = {
.pm = pm_ptr(&i2c_dw_dev_pm_ops),
},
.id_table = i2c_designware_pci_ids,
};
module_pci_driver(dw_i2c_driver);
MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("I2C_DW");
MODULE_IMPORT_NS("I2C_DW_COMMON");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/err.h`, `linux/errno.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/io.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct dw_scl_sda_cfg`, `struct dw_pci_controller`, `enum dw_pci_ctl_id_t`, `function mfld_get_clk_rate_khz`, `function mfld_setup`, `function mrfld_setup`, `function ehl_get_clk_rate_khz`, `function navi_amd_get_clk_rate_khz`, `function navi_amd_setup`, `function i2c_dw_pci_probe`.
- Atlas domain: Driver Families / drivers/i2c.
- Implementation status: pattern implementation candidate.
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.