iio_gts_find...e_using_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ iio_gts_find...e_using_time(9) β€” the Kernel API Manual moment πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for iio_gts_find...e_using_time(9) β€” yes the name is a whole mouthful, we're surviving tho 🫢


✨ NAME ✨

iio_gts_find_gain_for_scale_using_time β€” Find gain by time and scale πŸ‘‘


🌸 SYNOPSIS 🌸

int iio_gts_find_gain_for_scale_using_time (struct iio_gts *gts , int
time_sel , int scale_int , int scale_nano , int *gain );

like, that's the whole signature, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gts β€” Gain time scale descriptor. this is your main character struct, the whole vibe, the context of the operation πŸ’–
  • time_sel β€” Integration time selector corresponding to the time gain is searched for. yep, that's the exact wording β€” you hand it a time selector and it goes looking for the gain that matches πŸ‘€
  • scale_int β€” Integral part of the scale (typically val1). the whole-number half of your scale, the chill part πŸ“
  • scale_nano β€” Fractional part of the scale (nano or ppb). the tiny little decimal crumbs, iconic 🌈
  • gain β€” Pointer to value where gain is stored. it writes the answer here, so like… give it somewhere to live πŸ’…

🧚 DESCRIPTION 🧚

so in some cases the light sensors may want to find a gain setting which corresponds given scale and integration time. that's the whole plot, fr fr πŸ”₯

sensors which fill the gain and time tables may use this helper to retrieve the gain. it's giving "give the helper the tables, the helper gives you the gain," and honestly? ate πŸ’€βœ¨


🫢 RETURN 🫢

  • 0 on success β€” slay, found it πŸ‘‘
  • -EINVAL if gain matching the parameters is not found β€” aka the search came up empty, bestie 😭
ngl if you see -EINVAL, the gain you asked for just doesn't exist for that scale + time combo. not a crash, just a "no <3" πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

okay this list is LONG and honestly kind of iconic, here we go β€” the kernel file is ./drivers/iio/industrialio-gts-helper.c and these are all the siblings in the family group chat:

like, that's the whole extended universe fr fr 🌟


so yeah, that's the page πŸ’– it lives over in ./drivers/iio and it's dated October 2026 β€” mwah, go read the source bestie, iykyk πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from