drivers/gpio/gpio-ml-ioh.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-ml-ioh.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-ml-ioh.c- Extension
.c- Size
- 12949 bytes
- Lines
- 529
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/slab.hlinux/pci.hlinux/gpio/driver.hlinux/interrupt.hlinux/irq.h
Detected Declarations
struct ioh_reg_comnstruct ioh_regsstruct ioh_gpio_reg_datastruct ioh_gpiofunction ioh_gpio_setfunction ioh_gpio_getfunction ioh_gpio_direction_outputfunction ioh_gpio_direction_inputfunction ioh_gpio_save_reg_conffunction ioh_gpio_restore_reg_conffunction ioh_gpio_to_irqfunction ioh_gpio_setupfunction ioh_irq_typefunction ioh_irq_unmaskfunction ioh_irq_maskfunction ioh_irq_disablefunction ioh_irq_enablefunction ioh_gpio_handlerfunction ioh_gpio_alloc_generic_chipfunction ioh_gpio_probefunction ioh_gpio_suspendfunction ioh_gpio_resume
Annotated Snippet
static struct pci_driver ioh_gpio_driver = {
.name = "ml_ioh_gpio",
.id_table = ioh_gpio_pcidev_id,
.probe = ioh_gpio_probe,
.driver = {
.pm = pm_sleep_ptr(&ioh_gpio_pm_ops),
},
};
module_pci_driver(ioh_gpio_driver);
MODULE_DESCRIPTION("OKI SEMICONDUCTOR ML-IOH series GPIO Driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/slab.h`, `linux/pci.h`, `linux/gpio/driver.h`, `linux/interrupt.h`, `linux/irq.h`.
- Detected declarations: `struct ioh_reg_comn`, `struct ioh_regs`, `struct ioh_gpio_reg_data`, `struct ioh_gpio`, `function ioh_gpio_set`, `function ioh_gpio_get`, `function ioh_gpio_direction_output`, `function ioh_gpio_direction_input`, `function ioh_gpio_save_reg_conf`, `function ioh_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.