STRUCT AD7303_STATE(9)
โจ NAME โจ
okay so bestie, this page is from the Kernel API Manual, and itโs all about struct ad7303_state โ literally driver instance specific data. no cap, itโs giving โone struct to hold the per-instance stateโ energy. ๐ซถ
๐ธ SYNOPSIS ๐ธ
hereโs the whole struct, copied exactly so you can vibe-check it:
struct ad7303_state {
struct spi_device *spi;
uint16_t config;
uint8_t dac_cache[2];
struct regulator *vdd_reg;
struct regulator *vref_reg;
struct mutex lock;
__be16 data;
};
๐ Members ๐
spiโ the device for this driver instance. itโs literally the SPI device this driver instance is attached to ๐ซถconfigโ cached config register value. keeping that register value cached, periodt โจdac_cacheโ current DAC raw value (chip does not support readback). yes bestie, that parenthetical is real: the chip does not support readback ๐ญvdd_regโ reference to VDD regulator. highkey just a reference to the VDD regulator ๐ฅvref_regโ reference to VREF regulator. same vibe, but for VREF ๐lockโ protect writes and cache updates. the lock is there to protect writes and cache updates, no cap ๐dataโ spi transfer buffer. literally the SPI transfer buffer ๐
๐ฎ SEE ALSO ๐ฎ
- Kernel file
./drivers/iio/dac/ad7303.c๐
okay bye bestie ๐ this iconic little page is from the Kernel API Manual โ source/version ./drivers/iio/dac, October 2026, struct ad7303_state(9). slay. โจ
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms