STRUCT AD7303_STATE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ 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