STRUCT AD5755_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ad5755_state(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct ad5755_state, and it's literally the driver instance specific data. like, everything one particular ad5755 driver instance needs to keep track of, all chillin' in one struct. iconic behavior tbh πŸŽ€


🌸 SYNOPSIS 🌸

like, here's the whole vibe, character for character:

struct ad5755_state {
    struct spi_device               *spi;
    const struct ad5755_chip_info   *chip_info;
    unsigned int                    pwr_down;
    unsigned int                    ctrl[AD5755_NUM_CHANNELS];
    struct iio_chan_spec            channels[AD5755_NUM_CHANNELS];
    struct mutex                    lock;
    union {
      __be32 d32;
      u8 d8[4];
    } data[2];
 };

no cap, that's the whole thing 🫢


πŸ¦‹ Members πŸ¦‹

  • spi β€” the spi device the driver is attached to. that's the whole reason this struct exists, fr fr πŸ’…
  • chip_info β€” chip model specific constants, available modes, etc. so like, the chip's whole personality πŸŽ€
  • pwr_down β€” a bitmask that contains hether a channel is powered down or not. yes, "hether" β€” that's exactly how it's spelled in the original, and honestly? we're keeping it, it's iconic 😭 (it means "whether", iykyk)
  • ctrl β€” software shadow of the channel ctrl registers. a little ghost copy of the regs, living in RAM ✨
  • channels β€” iio channel spec for the device. the whole channel situation 🌈
  • lock β€” lock to protect the data buffer during SPI ops. gotta keep things safe during the transfer, no chaos allowed πŸ”₯
  • data β€” spi transfer buffers. always 2 of them (data[2]), and each one's a union so you can look at the same bytes as a __be32 d32 or as a u8 d8[4] β€” like, same energy, two fits πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/iio/dac/ad5755.c
  • struct ad5755_platform_data(9)
  • struct ad5755_chip_info(9)

go read those next, bestie, they're the supporting cast 🧚


πŸ’€ tiny heads-up: that pwr_down line in the original genuinely says "hether", so if you're grepping for it, don't come for me β€” I just relay the lore πŸ™ˆ

and that's the page!! 🌸 this one's from the source ./drivers/iio/dac, dated October 2026 β€” mwah, love that for us πŸ’– periodt βœ¨πŸŽ€

πŸ“¦ where this page comes from