iio_gts_find...e_using_time(9)
π¦ 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 (typicallyval1). 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 π«Ά
0on success β slay, found it π-EINVALif 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:
iio_gts_get_gain(9)gain_get_scale_fraction(9)iio_gts_total_gain_to_scale(9)iio_gts_purge_avail_scale_table(9)iio_gts_build_avail_scale_table(9)iio_gts_build_avail_time_table(9)iio_gts_purge_avail_time_table(9)iio_gts_build_avail_tables(9)iio_gts_purge_avail_tables(9)devm_iio_gts_build_avail_tables(9)devm_iio_init_iio_gts(9)iio_gts_all_avail_scales(9)iio_gts_avail_scales_for_time(9)iio_gts_avail_times(9)iio_gts_find_sel_by_gain(9)iio_gts_find_gain_by_sel(9)iio_gts_get_min_gain(9)iio_find_closest_gain_low(9)iio_gts_find_gain_sel_for_scale_using_time(9)iio_gts_find_gain_time_sel_for_scale(9)iio_gts_get_total_gain(9)iio_gts_get_scale(9)iio_gts_find_new_gain_sel_by_old_gain_time(9)iio_gts_find_new_gain_by_old_gain_time(9)iio_gts_find_new_gain_by_gain_time_min(9)
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
- 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