drivers/gpio/gpio-sch311x.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-sch311x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-sch311x.c- Extension
.c- Size
- 11266 bytes
- Lines
- 452
- 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/ioport.hlinux/module.hlinux/kernel.hlinux/init.hlinux/platform_device.hlinux/gpio/driver.hlinux/bitops.hlinux/io.h
Detected Declarations
struct sch311x_pdev_datastruct sch311x_gpio_blockstruct sch311x_gpio_privstruct sch311x_gpio_block_deffunction sch311x_sio_enterfunction sch311x_sio_exitfunction sch311x_sio_inbfunction sch311x_sio_outbfunction sch311x_gpio_requestfunction sch311x_gpio_freefunction sch311x_gpio_getfunction __sch311x_gpio_setfunction sch311x_gpio_setfunction sch311x_gpio_direction_infunction sch311x_gpio_direction_outfunction sch311x_gpio_get_directionfunction sch311x_gpio_set_configfunction sch311x_gpio_probefunction sch311x_detectfunction sch311x_gpio_pdev_addfunction sch311x_gpio_initfunction sch311x_gpio_exitmodule init sch311x_gpio_init
Annotated Snippet
module_init(sch311x_gpio_init);
module_exit(sch311x_gpio_exit);
MODULE_AUTHOR("Bruno Randolf <br1@einfach.org>");
MODULE_DESCRIPTION("SMSC SCH311x GPIO Driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:gpio-sch311x");
Annotation
- Immediate include surface: `linux/ioport.h`, `linux/module.h`, `linux/kernel.h`, `linux/init.h`, `linux/platform_device.h`, `linux/gpio/driver.h`, `linux/bitops.h`, `linux/io.h`.
- Detected declarations: `struct sch311x_pdev_data`, `struct sch311x_gpio_block`, `struct sch311x_gpio_priv`, `struct sch311x_gpio_block_def`, `function sch311x_sio_enter`, `function sch311x_sio_exit`, `function sch311x_sio_inb`, `function sch311x_sio_outb`, `function sch311x_gpio_request`, `function sch311x_gpio_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.