drivers/gpio/gpio-viperboard.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-viperboard.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-viperboard.c- Extension
.c- Size
- 12129 bytes
- Lines
- 480
- 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/kernel.hlinux/errno.hlinux/module.hlinux/slab.hlinux/types.hlinux/mutex.hlinux/platform_device.hlinux/usb.hlinux/gpio/driver.hlinux/mfd/viperboard.h
Detected Declarations
struct vprbrd_gpioa_msgstruct vprbrd_gpiob_msgstruct vprbrd_gpiofunction vprbrd_gpioa_getfunction vprbrd_gpioa_setfunction vprbrd_gpioa_direction_inputfunction vprbrd_gpioa_direction_outputfunction vprbrd_gpiob_setdirfunction vprbrd_gpiob_getfunction vprbrd_gpiob_setfunction vprbrd_gpiob_direction_inputfunction vprbrd_gpiob_direction_outputfunction vprbrd_gpio_probefunction vprbrd_gpio_initfunction vprbrd_gpio_exitmodule init vprbrd_gpio_init
Annotated Snippet
subsys_initcall(vprbrd_gpio_init);
static void __exit vprbrd_gpio_exit(void)
{
platform_driver_unregister(&vprbrd_gpio_driver);
}
module_exit(vprbrd_gpio_exit);
MODULE_AUTHOR("Lars Poeschel <poeschel@lemonage.de>");
MODULE_DESCRIPTION("GPIO driver for Nano River Techs Viperboard");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:viperboard-gpio");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/module.h`, `linux/slab.h`, `linux/types.h`, `linux/mutex.h`, `linux/platform_device.h`, `linux/usb.h`.
- Detected declarations: `struct vprbrd_gpioa_msg`, `struct vprbrd_gpiob_msg`, `struct vprbrd_gpio`, `function vprbrd_gpioa_get`, `function vprbrd_gpioa_set`, `function vprbrd_gpioa_direction_input`, `function vprbrd_gpioa_direction_output`, `function vprbrd_gpiob_setdir`, `function vprbrd_gpiob_get`, `function vprbrd_gpiob_set`.
- 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.