iio_gts_find...el_for_scale(9)
πΈ iio_gts_find_gain_time_sel_for_scale β iio_gts_find...el_for_scale(9) πΈ
okay bestie, welcome to the <pink>Kernel API Manual</pink> for iio_gts_find_gain_time_sel_for_scale, literally the function whose name got so long the header had to abbreviate it to iio_gts_find...el_for_scale(9). we don't judge, we respect the hustle π
β¨ NAME β¨
iio_gts_find_gain_time_sel_for_scale β Fetch gain and time selectors for scale π
π¦ SYNOPSIS π¦
int iio_gts_find_gain_time_sel_for_scale (struct iio_gts *gts , int
scale_int , int scale_nano , int *gain_sel , int *time_sel );
π ARGUMENTS π
gtsβ the Gain time scale descriptor, aka the main character struct of this whole operation πscale_intβ the Integral part of the scale (typicallyval1), i.e. the whole-number bit, no cap β¨scale_nanoβ the Fractional part of the scale (nanoorppb) β the tiny little sliver of the number π§gain_selβ Pointer to value where gain selector is stored. give it a pointer and it'll fill it in, obsessed π«Άtime_selβ Pointer to value where time selector is stored. same deal, but for time β
π DESCRIPTION π
so basically this one is a Wrapper around iio_gts_find_gain_for_scale_using_time β it goes and fetches the gain and time selectors for a given scale for you. it's giving "middle management but make it helpful". you hand it a scale, it hands back the selectors. iconic behaviour, honestly π₯
π RETURN π
0 on success and -EINVAL on error. that's it, that's the whole vibe check. if you get the -EINVAL bestie, something was not it π
β SEE ALSO β
Kernel file ./drivers/iio/industrialio-gts-helper.c β go read the source, iykyk π
and the whole friend group of related functions, all of which are literally right there:
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_for_scale_using_time(9)iio_gts_find_gain_sel_for_scale_using_time(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)
ok that's the whole page bestie, go forth and select your gains π
and that's a wrap, mwah π this one shipped from ./drivers/iio, dated October 2026, and it goes by iio_gts_find...el_for_scale(9) β abbreviated name, full main character energy. slay πβ¨
π¦ 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