STRUCT IIO_GAIN_SEL_PAIR(9)
π struct iio_gain_sel_pair(9) β the kernel API manual, bestie edition
okay so this is the page for struct iio_gain_sel_pair(9), from the Kernel API Manual, and honestly? it's a lil baby struct with a big job. let's get into it β¨
πΈ NAME πΈ
struct iio_gain_sel_pair β gain - selector values. that's it. that's the whole name. iconic behavior honestly π
β¨ SYNOPSIS β¨
struct iio_gain_sel_pair {
int gain;
int sel;
};
two ints. that's the whole struct. no cap, it's giving minimalist main character energy π¦
π«Ά Members π«Ά
gainβ the gain (multiplication) value, aka how much we're multiplying the signal. gain must be positive, fr fr β negative values are reserved for error handling, so don't come in here with your negative numbers, they're not for you πselβ the selector (usually a register value) used to indicate this gain. it's the lil label that says "hey, this gain right here" π
π Description π
okay so picture this: in many cases, devices like light sensors let you set the signal amplification (gain) using a register interface. so we need a way to keep track of which register value means which gain. that's literally what this structure does β it describes the amplification and the corresponding selector (register value) together, as a matched pair. it's giving matching outfits, it's giving couple goals, it's giving "these two ints belong together" π
π₯ NOTE π₯
only selectors >= 0 are supported. like, that's the rule. don't test it. the kernel will not be cute about it π
π SEE ALSO π
- Kernel file
./include/linux/iio/iio-gts-helper.hβ the home turf, go look at it π§ struct iio_itime_sel_mul(9)iio_gts_find_int_time_by_sel(9)iio_gts_find_sel_by_int_time(9)iio_gts_valid_time(9)iio_gts_valid_gain(9)
like the whole gts squad, all linked, all valid, all slay β
and that's the page!! mwah π this one lives in ./include/linux/iio and it's dated October 2026, so jot that down in your notes app and go read the source bestie, ily, bye ππ
π¦ 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