drivers/regulator/lp3972.c
Source file repositories/reference/linux-study-clean/drivers/regulator/lp3972.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/regulator/lp3972.c- Extension
.c- Size
- 14698 bytes
- Lines
- 569
- Domain
- Driver Families
- Bucket
- drivers/regulator
- 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/bug.hlinux/err.hlinux/i2c.hlinux/module.hlinux/kernel.hlinux/regulator/driver.hlinux/regulator/lp3972.hlinux/slab.h
Detected Declarations
struct lp3972function lp3972_i2c_readfunction lp3972_i2c_writefunction lp3972_reg_readfunction lp3972_set_bitsfunction lp3972_ldo_is_enabledfunction lp3972_ldo_enablefunction lp3972_ldo_disablefunction lp3972_ldo_get_voltage_selfunction lp3972_ldo_set_voltage_selfunction registerfunction lp3972_dcdc_is_enabledfunction lp3972_dcdc_enablefunction lp3972_dcdc_disablefunction lp3972_dcdc_get_voltage_selfunction lp3972_dcdc_set_voltage_selfunction setup_regulatorsfunction lp3972_i2c_probefunction lp3972_module_initfunction lp3972_module_exitmodule init lp3972_module_init
Annotated Snippet
subsys_initcall(lp3972_module_init);
static void __exit lp3972_module_exit(void)
{
i2c_del_driver(&lp3972_i2c_driver);
}
module_exit(lp3972_module_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Axel Lin <axel.lin@gmail.com>");
MODULE_DESCRIPTION("LP3972 PMIC driver");
Annotation
- Immediate include surface: `linux/bug.h`, `linux/err.h`, `linux/i2c.h`, `linux/module.h`, `linux/kernel.h`, `linux/regulator/driver.h`, `linux/regulator/lp3972.h`, `linux/slab.h`.
- Detected declarations: `struct lp3972`, `function lp3972_i2c_read`, `function lp3972_i2c_write`, `function lp3972_reg_read`, `function lp3972_set_bits`, `function lp3972_ldo_is_enabled`, `function lp3972_ldo_enable`, `function lp3972_ldo_disable`, `function lp3972_ldo_get_voltage_sel`, `function lp3972_ldo_set_voltage_sel`.
- Atlas domain: Driver Families / drivers/regulator.
- 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.