drivers/regulator/ad5398.c
Source file repositories/reference/linux-study-clean/drivers/regulator/ad5398.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/regulator/ad5398.c- Extension
.c- Size
- 6698 bytes
- Lines
- 286
- 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.
- 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/module.hlinux/err.hlinux/i2c.hlinux/slab.hlinux/platform_device.hlinux/regulator/driver.hlinux/regulator/machine.hlinux/regulator/of_regulator.h
Detected Declarations
struct ad5398_chip_infostruct ad5398_current_data_formatfunction ad5398_calc_currentfunction ad5398_read_regfunction ad5398_write_regfunction ad5398_get_current_limitfunction ad5398_set_current_limitfunction ad5398_is_enabledfunction ad5398_enablefunction ad5398_disablefunction ad5398_probefunction ad5398_initfunction ad5398_exitmodule init ad5398_init
Annotated Snippet
subsys_initcall(ad5398_init);
static void __exit ad5398_exit(void)
{
i2c_del_driver(&ad5398_driver);
}
module_exit(ad5398_exit);
MODULE_DESCRIPTION("AD5398 and AD5821 current regulator driver");
MODULE_AUTHOR("Sonic Zhang");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/err.h`, `linux/i2c.h`, `linux/slab.h`, `linux/platform_device.h`, `linux/regulator/driver.h`, `linux/regulator/machine.h`, `linux/regulator/of_regulator.h`.
- Detected declarations: `struct ad5398_chip_info`, `struct ad5398_current_data_format`, `function ad5398_calc_current`, `function ad5398_read_reg`, `function ad5398_write_reg`, `function ad5398_get_current_limit`, `function ad5398_set_current_limit`, `function ad5398_is_enabled`, `function ad5398_enable`, `function ad5398_disable`.
- Atlas domain: Driver Families / drivers/regulator.
- Implementation status: integration implementation candidate.
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.