drivers/gpio/gpio-twl4030.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-twl4030.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-twl4030.c- Extension
.c- Size
- 15091 bytes
- Lines
- 638
- 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.
- 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/module.hlinux/init.hlinux/interrupt.hlinux/kthread.hlinux/irq.hlinux/gpio/machine.hlinux/gpio/driver.hlinux/gpio/consumer.hlinux/platform_device.hlinux/of.hlinux/irqdomain.hlinux/mfd/twl.h
Detected Declarations
struct gpio_twl4030_privfunction gpio_twl4030_writefunction gpio_twl4030_readfunction twl4030_led_set_valuefunction twl4030_set_gpio_directionfunction twl4030_get_gpio_directionfunction twl4030_set_gpio_dataoutfunction twl4030_get_gpio_datainfunction twl_requestfunction twl_freefunction twl_direction_infunction twl_getfunction twl_setfunction twl_direction_outfunction twl_get_directionfunction twl_to_irqfunction gpio_twl4030_pullsfunction gpio_twl4030_debouncefunction gpio_twl4030_power_off_actionfunction gpio_twl4030_probefunction of_machine_is_compatiblefunction gpio_twl4030_initfunction gpio_twl4030_exitmodule init gpio_twl4030_init
Annotated Snippet
subsys_initcall(gpio_twl4030_init);
static void __exit gpio_twl4030_exit(void)
{
platform_driver_unregister(&gpio_twl4030_driver);
}
module_exit(gpio_twl4030_exit);
MODULE_AUTHOR("Texas Instruments, Inc.");
MODULE_DESCRIPTION("GPIO interface for TWL4030");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/interrupt.h`, `linux/kthread.h`, `linux/irq.h`, `linux/gpio/machine.h`, `linux/gpio/driver.h`, `linux/gpio/consumer.h`.
- Detected declarations: `struct gpio_twl4030_priv`, `function gpio_twl4030_write`, `function gpio_twl4030_read`, `function twl4030_led_set_value`, `function twl4030_set_gpio_direction`, `function twl4030_get_gpio_direction`, `function twl4030_set_gpio_dataout`, `function twl4030_get_gpio_datain`, `function twl_request`, `function twl_free`.
- 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.
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.