drivers/spi/spi-pci1xxxx.c
Source file repositories/reference/linux-study-clean/drivers/spi/spi-pci1xxxx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/spi/spi-pci1xxxx.c- Extension
.c- Size
- 33584 bytes
- Lines
- 1032
- Domain
- Driver Families
- Bucket
- drivers/spi
- 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/bitfield.hlinux/delay.hlinux/dma-mapping.hlinux/iopoll.hlinux/irq.hlinux/module.hlinux/msi.hlinux/pci_regs.hlinux/pci.hlinux/spinlock.hlinux/spi/spi.hinternals.h
Detected Declarations
struct pci1xxxx_spi_internalstruct pci1xxxx_spifunction pci1xxxx_set_sys_lockfunction pci1xxxx_acquire_sys_lockfunction pci1xxxx_release_sys_lockfunction pci1xxxx_check_spi_can_dmafunction pci1xxxx_spi_dma_configfunction pci1xxxx_spi_dma_initfunction pci1xxxx_spi_set_csfunction pci1xxxx_get_clock_divfunction pci1xxxx_spi_setup_dma_to_iofunction pci1xxxx_spi_setup_dma_from_iofunction pci1xxxx_spi_setupfunction pci1xxxx_start_spi_xferfunction pci1xxxx_spi_transfer_with_iofunction pci1xxxx_spi_transfer_with_dmafunction pci1xxxx_spi_transfer_onefunction pci1xxxx_spi_isr_iofunction pci1xxxx_spi_setup_next_dma_to_io_transferfunction pci1xxxx_spi_setup_next_dma_from_io_transferfunction pci1xxxx_spi_isr_dma_rdfunction pci1xxxx_spi_isr_dma_wrfunction pci1xxxx_spi_isr_dmafunction pci1xxxx_spi_isrfunction pci1xxxx_spi_shared_isrfunction pci1xxxx_spi_can_dmafunction pci1xxxx_spi_probefunction store_restore_configfunction pci1xxxx_spi_resumefunction pci1xxxx_spi_suspend
Annotated Snippet
static struct pci_driver pci1xxxx_spi_driver = {
.name = DRV_NAME,
.id_table = pci1xxxx_spi_pci_id_table,
.probe = pci1xxxx_spi_probe,
.driver = {
.pm = pm_sleep_ptr(&spi_pm_ops),
},
};
module_pci_driver(pci1xxxx_spi_driver);
MODULE_DESCRIPTION("Microchip Technology Inc. pci1xxxx SPI bus driver");
MODULE_AUTHOR("Tharun Kumar P<tharunkumar.pasumarthi@microchip.com>");
MODULE_AUTHOR("Kumaravel Thiagarajan<kumaravel.thiagarajan@microchip.com>");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/delay.h`, `linux/dma-mapping.h`, `linux/iopoll.h`, `linux/irq.h`, `linux/module.h`, `linux/msi.h`, `linux/pci_regs.h`.
- Detected declarations: `struct pci1xxxx_spi_internal`, `struct pci1xxxx_spi`, `function pci1xxxx_set_sys_lock`, `function pci1xxxx_acquire_sys_lock`, `function pci1xxxx_release_sys_lock`, `function pci1xxxx_check_spi_can_dma`, `function pci1xxxx_spi_dma_config`, `function pci1xxxx_spi_dma_init`, `function pci1xxxx_spi_set_cs`, `function pci1xxxx_get_clock_div`.
- Atlas domain: Driver Families / drivers/spi.
- 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.