drivers/gpio/gpio-pca953x.c
Source file repositories/reference/linux-study-clean/drivers/gpio/gpio-pca953x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpio/gpio-pca953x.c- Extension
.c- Size
- 44371 bytes
- Lines
- 1516
- 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/atomic.hlinux/bitmap.hlinux/cleanup.hlinux/device.hlinux/errno.hlinux/i2c.hlinux/init.hlinux/interrupt.hlinux/irq.hlinux/mod_devicetable.hlinux/module.hlinux/mutex.hlinux/pm.hlinux/regmap.hlinux/regulator/consumer.hlinux/seq_file.hlinux/slab.hlinux/gpio/consumer.hlinux/gpio/driver.hlinux/pinctrl/pinconf-generic.hlinux/platform_data/pca953x.hlinux/acpi.hlinux/dmi.h
Detected Declarations
struct pca953x_reg_configstruct pca953x_chipfunction pca953x_acpi_get_irqfunction pca953x_bank_shiftfunction pca953x_get_bit_maskfunction pca953x_check_registerfunction pcal6534_check_registerfunction tca6418_check_registerfunction pca953x_readable_registerfunction pca953x_writeable_registerfunction pca953x_volatile_registerfunction pca953x_recalc_addrfunction pcal6534_recalc_addrfunction tca6418_recalc_addrfunction pca953x_write_regsfunction pca953x_read_regsfunction pca953x_gpio_direction_inputfunction pca953x_gpio_direction_outputfunction pca953x_gpio_get_valuefunction pca953x_gpio_set_valuefunction pca953x_gpio_get_directionfunction pca953x_gpio_get_multiplefunction pca953x_gpio_set_multiplefunction pca953x_gpio_set_pull_up_downfunction pca953x_gpio_set_configfunction pca953x_setup_gpiofunction pca953x_irq_maskfunction pca953x_irq_unmaskfunction pca953x_irq_set_wakefunction pca953x_irq_bus_lockfunction pca953x_irq_bus_sync_unlockfunction pca953x_irq_set_typefunction pca953x_irq_shutdownfunction pca953x_irq_print_chipfunction pca953x_irq_pendingfunction pca953x_irq_handlerfunction for_each_set_bitfunction pca953x_irq_setupfunction pca953x_irq_setupfunction device_pca95xx_initfunction device_pca957x_initfunction pca953x_disable_regulatorfunction pca953x_get_and_enable_regulatorfunction pca953x_probefunction pca953x_regcache_syncfunction pca953x_restore_contextfunction pca953x_save_contextfunction pca953x_suspend
Annotated Snippet
subsys_initcall(pca953x_init);
static void __exit pca953x_exit(void)
{
i2c_del_driver(&pca953x_driver);
}
module_exit(pca953x_exit);
MODULE_AUTHOR("eric miao <eric.miao@marvell.com>");
MODULE_DESCRIPTION("GPIO expander driver for PCA953x");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/bitmap.h`, `linux/cleanup.h`, `linux/device.h`, `linux/errno.h`, `linux/i2c.h`, `linux/init.h`, `linux/interrupt.h`.
- Detected declarations: `struct pca953x_reg_config`, `struct pca953x_chip`, `function pca953x_acpi_get_irq`, `function pca953x_bank_shift`, `function pca953x_get_bit_mask`, `function pca953x_check_register`, `function pcal6534_check_register`, `function tca6418_check_register`, `function pca953x_readable_register`, `function pca953x_writeable_register`.
- 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.