drivers/gpio/gpio-pch.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-pch.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-pch.c- Extension
.c- Size
- 11733 bytes
- Lines
- 455
- Domain
- Driver Families
- Bucket
- drivers/gpio
- 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/bits.hlinux/gpio/driver.hlinux/interrupt.hlinux/irq.hlinux/kernel.hlinux/module.hlinux/pci.hlinux/slab.h
Detected Declarations
struct pch_regsstruct pch_gpio_reg_datastruct pch_gpioenum pch_type_tfunction pch_gpio_setfunction pch_gpio_getfunction pch_gpio_direction_outputfunction pch_gpio_direction_inputfunction pch_gpio_save_reg_conffunction pch_gpio_restore_reg_conffunction pch_gpio_to_irqfunction pch_gpio_setupfunction pch_irq_typefunction pch_irq_unmaskfunction pch_irq_maskfunction pch_irq_ackfunction pch_gpio_handlerfunction pch_gpio_alloc_generic_chipfunction pch_gpio_probefunction pch_gpio_suspendfunction pch_gpio_resume
Annotated Snippet
static struct pci_driver pch_gpio_driver = {
.name = "pch_gpio",
.id_table = pch_gpio_pcidev_id,
.probe = pch_gpio_probe,
.driver = {
.pm = pm_sleep_ptr(&pch_gpio_pm_ops),
},
};
module_pci_driver(pch_gpio_driver);
MODULE_DESCRIPTION("PCH GPIO PCI Driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/bits.h`, `linux/gpio/driver.h`, `linux/interrupt.h`, `linux/irq.h`, `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/slab.h`.
- Detected declarations: `struct pch_regs`, `struct pch_gpio_reg_data`, `struct pch_gpio`, `enum pch_type_t`, `function pch_gpio_set`, `function pch_gpio_get`, `function pch_gpio_direction_output`, `function pch_gpio_direction_input`, `function pch_gpio_save_reg_conf`, `function pch_gpio_restore_reg_conf`.
- Atlas domain: Driver Families / drivers/gpio.
- 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.