drivers/iio/dac/ad5446.h

Source file repositories/reference/linux-study-clean/drivers/iio/dac/ad5446.h

File Facts

System
Linux kernel
Corpus path
drivers/iio/dac/ad5446.h
Extension
.h
Size
2128 bytes
Lines
78
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ad5446_state {
	struct device *dev;
	const struct ad5446_chip_info *chip_info;
	unsigned short vref_mv;
	unsigned int cached_val;
	unsigned int pwr_down_mode;
	unsigned int pwr_down;
	/* mutex to protect device shared data */
	struct mutex lock;
	union {
		__be16 d16;
		u8 d24[3];
	} __aligned(IIO_DMA_MINALIGN);
};

/**
 * struct ad5446_chip_info - chip specific information
 * @channel:		channel spec for the DAC
 * @int_vref_mv:	AD5620/40/60: the internal reference voltage
 * @write:		chip specific helper function to write to the register
 */
struct ad5446_chip_info {
	struct iio_chan_spec channel;
	u16 int_vref_mv;
	int (*write)(struct ad5446_state *st, unsigned int val);
};

int ad5446_probe(struct device *dev, const char *name,
		 const struct ad5446_chip_info *chip_info);

#endif

Annotation

Implementation Notes