iio_gts_ava...les_for_time(9)
β¨ 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:
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_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_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)
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
- 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