iio_gts_ava...les_for_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ iio_gts_avail_scales_for_time β€” the glow-up guide ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's about iio_gts_avail_scales_for_time(9) and honestly it's giving "helpful little helper function" energy and i'm obsessed 🫢


🌸 NAME 🌸

iio_gts_avail_scales_for_time β€” literally just lists scales for a given integration time, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int iio_gts_avail_scales_for_time(struct iio_gts *gts, int time,
                                  const int **vals, int *type, int *length);

πŸŽ€ ARGUMENTS πŸŽ€

  • gts β€” the Gain time scale descriptor, aka the main character struct of this whole situation πŸ‘‘
  • time β€” the integration time you're asking about, and yes the scales get listed for this time specifically πŸ•°οΈ
  • vals β€” the returned array of supported scales, hand-delivered to you ✨
  • type β€” the type of the returned scale values, so you know what you're looking at πŸ”
  • length β€” how many values actually came back in the array, iykyk πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: some drivers do not allow scale setting to change integration time πŸ™…β€β™€οΈ and if that's your driver, this helper is your new bestie. you use it to list only the scales that are valid for a given integration time β€” no extra junk, no invalid entries, just the good stuff πŸ’…βœ¨


πŸ”₯ RETURN πŸ”₯

it returns a value that's suitable to be returned from read_avail, or a negative error if things go sideways 😭 (negative error = vibe check failed, handle it).


🌈 SEE ALSO 🌈

all the siblings and cousins, fr fr β€” and they all live in the kernel file ./drivers/iio/industrialio-gts-helper.c:


that's the whole page bestie, you ate it up πŸ’…βœ¨ and if you wanna cite your source, this gorgeous little number comes from ./drivers/iio and it's dated October 2026 β€” iconic, periodt πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from