STRUCT AD7606_CHAN_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct ad7606_chan_info(9) β€” channel configuration, bestie

okay so this is a page from the Kernel API Manual and it's literally just the vibe check on one struct, so let's get into it 🫢


✨ NAME ✨

struct ad7606_chan_info β€” channel configuration. that's it, that's the whole name. it's giving "i configure one channel and i do it fabulously" πŸ’…


🌸 SYNOPSIS 🌸

struct ad7606_chan_info {
  #define AD760X_MAX_SCALES               16;
    const unsigned int              (*scale_avail)[2];
    unsigned int                    num_scales;
    unsigned int                    range;
    unsigned int                    reg_offset;
    unsigned int                    r_gain;
 };

yes she has a #define living inside the struct declaration, no i will not be explaining that further, i did not write it 😭 β€” it's AD760X_MAX_SCALES and it's 16. iconic of her.


πŸŽ€ Members πŸŽ€

quick tour of every single field, no skips, no cuts, we're doing all of them πŸ’–

  • scale_avail β€” pointer to the array which stores the available scales. like a lil menu of scales, and this points at it πŸ“
  • num_scales β€” number of elements stored in the scale_avail array. how many things are on the menu. counting is important bestie ✨
  • range β€” voltage range selection, selects which scale to apply. this is the actual choosing, the main character of the struct lowkey πŸ‘‘
  • reg_offset β€” offset for the register value, to be applied when writing the value of range to the register value. yes it's offsets on offsets, that's the bit, that's the deal πŸ”₯
  • r_gain β€” gain resistor value in ohms, to be set to match the external r_filter value. ohms!! real units!! she's matching her external r_filter, as one does πŸ¦‹

🌈 SEE ALSO 🌈

go look at the Kernel file ./drivers/iio/adc/ad7606.h and also these absolute legends:

  • struct ad7606_chip_info(9)
  • struct ad7606_state(9)
  • struct ad7606_bus_ops(9)
  • struct ad7606_bus_info(9)

iykyk πŸ’€


fr fr: keep r_gain in ohms and matched to the external r_filter value, that's literally what the member says and i'm just the messenger 🧚

⭐ that's the whole page, nothing missing, no cap. this one's from ./drivers/iio/adc, dated October 2026, and it's called struct ad7606_chan_info(9) β€” mwah, periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from