drivers/iio/dac/ad5686.h
Source file repositories/reference/linux-study-clean/drivers/iio/dac/ad5686.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/dac/ad5686.h- Extension
.h- Size
- 3626 bytes
- Lines
- 161
- Domain
- Driver Families
- Bucket
- drivers/iio
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/cache.hlinux/mutex.hlinux/kernel.hlinux/iio/iio.h
Detected Declarations
struct ad5686_statestruct ad5686_chip_infostruct ad5686_stateenum ad5686_supported_device_idsenum ad5686_regmap_type
Annotated Snippet
struct ad5686_chip_info {
u16 int_vref_mv;
unsigned int num_channels;
const struct iio_chan_spec *channels;
enum ad5686_regmap_type regmap_type;
};
/**
* struct ad5686_state - driver instance specific data
* @spi: spi_device
* @chip_info: chip model specific constants, available modes etc
* @vref_mv: actual reference voltage used
* @pwr_down_mask: power down mask
* @pwr_down_mode: current power down mode
* @use_internal_vref: set to true if the internal reference voltage is used
* @lock lock to protect the data buffer during regmap ops
* @data: spi transfer buffers
*/
struct ad5686_state {
struct device *dev;
const struct ad5686_chip_info *chip_info;
unsigned short vref_mv;
unsigned int pwr_down_mask;
unsigned int pwr_down_mode;
ad5686_write_func write;
ad5686_read_func read;
bool use_internal_vref;
struct mutex lock;
/*
* DMA (thus cache coherency maintenance) may require the
* transfer buffers to live in their own cache lines.
*/
union {
__be32 d32;
__be16 d16;
u8 d8[4];
} data[3] __aligned(IIO_DMA_MINALIGN);
};
int ad5686_probe(struct device *dev,
enum ad5686_supported_device_ids chip_type,
const char *name, ad5686_write_func write,
ad5686_read_func read);
#endif /* __DRIVERS_IIO_DAC_AD5686_H__ */
Annotation
- Immediate include surface: `linux/types.h`, `linux/cache.h`, `linux/mutex.h`, `linux/kernel.h`, `linux/iio/iio.h`.
- Detected declarations: `struct ad5686_state`, `struct ad5686_chip_info`, `struct ad5686_state`, `enum ad5686_supported_device_ids`, `enum ad5686_regmap_type`.
- Atlas domain: Driver Families / drivers/iio.
- Implementation status: source 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.