STRUCT AD7606_CHAN_INFO(9)
π 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 thescale_availarray. 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 ofrangeto 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 externalr_filtervalue. ohms!! real units!! she's matching her externalr_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: keepr_gainin ohms and matched to the externalr_filtervalue, 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
- 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