STRUCT AD7606_BUS_OPS(9)
π¦ 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
- 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