STRUCT IIO_GAIN_SEL_PAIR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

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