drivers/iio/dac/ad5380.c
Source file repositories/reference/linux-study-clean/drivers/iio/dac/ad5380.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/dac/ad5380.c- Extension
.c- Size
- 13758 bytes
- Lines
- 596
- Domain
- Driver Families
- Bucket
- drivers/iio
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/err.hlinux/i2c.hlinux/kernel.hlinux/module.hlinux/spi/spi.hlinux/slab.hlinux/sysfs.hlinux/regmap.hlinux/regulator/consumer.hlinux/iio/iio.hlinux/iio/sysfs.h
Detected Declarations
struct ad5380_chip_infostruct ad5380_stateenum ad5380_typefunction ad5380_read_dac_powerdownfunction ad5380_write_dac_powerdownfunction ad5380_get_powerdown_modefunction ad5380_set_powerdown_modefunction ad5380_info_to_regfunction ad5380_write_rawfunction ad5380_read_rawfunction ad5380_alloc_channelsfunction ad5380_probefunction ad5380_reg_falsefunction ad5380_spi_probefunction ad5380_spi_register_driverfunction ad5380_spi_unregister_driverfunction ad5380_spi_register_driverfunction ad5380_spi_unregister_driverfunction ad5380_i2c_register_driverfunction ad5380_i2c_unregister_driverfunction ad5380_i2c_register_driverfunction ad5380_i2c_unregister_driverfunction ad5380_spi_exitmodule init ad5380_spi_init
Annotated Snippet
module_init(ad5380_spi_init);
static void __exit ad5380_spi_exit(void)
{
ad5380_i2c_unregister_driver();
ad5380_spi_unregister_driver();
}
module_exit(ad5380_spi_exit);
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_DESCRIPTION("Analog Devices AD5380/81/82/83/84/90/91/92 DAC");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/i2c.h`, `linux/kernel.h`, `linux/module.h`, `linux/spi/spi.h`, `linux/slab.h`, `linux/sysfs.h`.
- Detected declarations: `struct ad5380_chip_info`, `struct ad5380_state`, `enum ad5380_type`, `function ad5380_read_dac_powerdown`, `function ad5380_write_dac_powerdown`, `function ad5380_get_powerdown_mode`, `function ad5380_set_powerdown_mode`, `function ad5380_info_to_reg`, `function ad5380_write_raw`, `function ad5380_read_raw`.
- Atlas domain: Driver Families / drivers/iio.
- 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.