drivers/gpio/gpio-stmpe.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-stmpe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-stmpe.c- Extension
.c- Size
- 14832 bytes
- Lines
- 564
- Domain
- Driver Families
- Bucket
- drivers/gpio
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/bitops.hlinux/cleanup.hlinux/gpio/driver.hlinux/init.hlinux/interrupt.hlinux/mfd/stmpe.hlinux/property.hlinux/platform_device.hlinux/seq_file.hlinux/slab.hlinux/string_choices.h
Detected Declarations
struct stmpe_gpiofunction stmpe_gpio_getfunction stmpe_gpio_setfunction stmpe_gpio_get_directionfunction stmpe_gpio_direction_outputfunction stmpe_gpio_direction_inputfunction stmpe_gpio_requestfunction stmpe_gpio_irq_set_typefunction stmpe_gpio_irq_lockfunction stmpe_gpio_irq_sync_unlockfunction stmpe_gpio_irq_maskfunction stmpe_gpio_irq_unmaskfunction stmpe_dbg_show_onefunction stmpe_dbg_showfunction stmpe_gpio_irqfunction stmpe_init_irq_valid_maskfunction stmpe_gpio_disablefunction stmpe_gpio_probefunction stmpe_gpio_initfunction stmpe_gpio_exitmodule init stmpe_gpio_init
Annotated Snippet
subsys_initcall(stmpe_gpio_init);
static void __exit stmpe_gpio_exit(void)
{
platform_driver_unregister(&stmpe_gpio_driver);
}
module_exit(stmpe_gpio_exit);
MODULE_DESCRIPTION("STMPE expander GPIO");
MODULE_AUTHOR("Rabin Vincent <rabin.vincent@stericsson.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/cleanup.h`, `linux/gpio/driver.h`, `linux/init.h`, `linux/interrupt.h`, `linux/mfd/stmpe.h`, `linux/property.h`, `linux/platform_device.h`.
- Detected declarations: `struct stmpe_gpio`, `function stmpe_gpio_get`, `function stmpe_gpio_set`, `function stmpe_gpio_get_direction`, `function stmpe_gpio_direction_output`, `function stmpe_gpio_direction_input`, `function stmpe_gpio_request`, `function stmpe_gpio_irq_set_type`, `function stmpe_gpio_irq_lock`, `function stmpe_gpio_irq_sync_unlock`.
- Atlas domain: Driver Families / drivers/gpio.
- Implementation status: integration 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.