drivers/gpio/gpio-pcf857x.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-pcf857x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-pcf857x.c- Extension
.c- Size
- 13059 bytes
- Lines
- 472
- 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/delay.hlinux/gpio/consumer.hlinux/gpio/driver.hlinux/i2c.hlinux/interrupt.hlinux/irq.hlinux/irqdomain.hlinux/kernel.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/slab.hlinux/spinlock.h
Detected Declarations
struct pcf857xfunction i2c_write_le8function i2c_read_le8function i2c_write_le16function i2c_read_le16function pcf857x_inputfunction pcf857x_getfunction pcf857x_get_multiplefunction pcf857x_outputfunction pcf857x_setfunction pcf857x_set_multiplefunction pcf857x_irqfunction noopfunction pcf857x_irq_enablefunction pcf857x_irq_disablefunction pcf857x_irq_bus_lockfunction pcf857x_irq_bus_sync_unlockfunction pcf857x_probefunction pcf857x_shutdownfunction pcf857x_initfunction pcf857x_exitmodule init pcf857x_init
Annotated Snippet
subsys_initcall(pcf857x_init);
static void __exit pcf857x_exit(void)
{
i2c_del_driver(&pcf857x_driver);
}
module_exit(pcf857x_exit);
MODULE_DESCRIPTION("Driver for pcf857x, pca857x, and pca967x I2C GPIO expanders");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Brownell");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/gpio/driver.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/irq.h`, `linux/irqdomain.h`, `linux/kernel.h`.
- Detected declarations: `struct pcf857x`, `function i2c_write_le8`, `function i2c_read_le8`, `function i2c_write_le16`, `function i2c_read_le16`, `function pcf857x_input`, `function pcf857x_get`, `function pcf857x_get_multiple`, `function pcf857x_output`, `function pcf857x_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.
- 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.