STRUCT AD7606_BUS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct ad7606_bus_ops(9) β€” driver bus operations, bestie edition

okay so this is struct ad7606_bus_ops, straight out of the Kernel API Manual, section 9. it's the lil' vtable of function pointers that tells the ad7606 driver how to actually talk to its bus. think of it as the driver's group chat contact list β€” every callback it might need to hit up lives right here. πŸ’…


✨ NAME ✨

struct ad7606_bus_ops β€” driver bus operations. that's it, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

here's the struct in all its glory, no cap, exact copy:

struct ad7606_bus_ops {
    int (*iio_backend_config)(struct device *dev, struct iio_dev *indio_dev);
    int (*offload_config)(struct device *dev, struct iio_dev *indio_dev);
    int (*read_block)(struct device *dev, int num, void *data);
    int (*sw_mode_config)(struct iio_dev *indio_dev);
    int (*reg_read)(struct ad7606_state *st, unsigned int addr);
    int (*reg_write)(struct ad7606_state *st, unsigned int addr, unsigned int val);
    int (*update_scan_mode)(struct iio_dev *indio_dev, const unsigned long *scan_mask);
    u16 (*rd_wr_cmd)(int addr, char is_write_op);
};

eight function pointers. eight little besties. all of them optional in spirit, all of them load-bearing in practice. πŸ”₯


πŸ‘‘ Members πŸ‘‘

iio_backend_config

function pointer for configuring the iio_backend for the compatibles that use it. if your compatible is in the iio_backend club, this is the bouncer. ✨

offload_config

function pointer for configuring offload support, where any

okay so real talk: this description literally just trails off mid-sentence in the manual. "where any" and then… nothing. it's giving cliffhanger energy 😭. i'm not gonna invent the rest of the sentence for you β€” that's on the source, not on me. 🫢

read_block

function pointer for reading blocks of data. plural. blocks. not one byte, a whole block. iconic behavior fr fr. πŸ’–

sw_mode_config

pointer to a function which configured the device for software mode. yes, the manual says "configured," past tense, and honestly? slay, we're keeping it. 🌸

reg_read

function pointer for reading spi register. πŸ”

reg_write

function pointer for writing spi register. ✍️ vs πŸ”, you know the pair. πŸ’…

update_scan_mode

function pointer for handling the calls to iio_info's update_scan mode when enabling/disabling channels. channels go on, channels go off, and this lil' pointer handles the whole transition. main character energy. πŸ‘‘

rd_wr_cmd

pointer to the function which calculates the spi address. it does the math so the rest of us don't have to. 🧚


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/iio/adc/ad7606.h
  • struct ad7606_chip_info(9)
  • struct ad7606_chan_info(9)
  • struct ad7606_state(9)
  • struct ad7606_bus_info(9)

go read the whole friend group, they all link up. iykyk. πŸ’œ


and that's the page! πŸ’– this one came from ./drivers/iio/adc, dated October 2026, and it's struct ad7606_bus_ops(9) if you need to cite it later. mwah, study hard, bestie β€” periodt πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from