iio_gts_build_avail_tables(9)
π iio_gts_build_avail_tables β the Kernel API Manual, bestie edition π
okay so picture this: you're deep in the kernel, you open up the manual page for iio_gts_build_avail_tables (yes that's the function, yes the manual is called Kernel API Manual, and yes we're getting into it) and it's giving... walls of text. don't worry babe, I got you. β¨
πΈ NAME πΈ
iio_gts_build_avail_tables β literally just builds you the tables of available scales and integration times. that's it. that's the whole job. iconic behavior honestly. π
β¨ SYNOPSIS β¨
int iio_gts_build_avail_tables(struct iio_gts *gts);
π¦ ARGUMENTS π¦
gtsβ the gain time scale descriptor π this is the lil struct that holds all the info, she's the main character here.
π§ DESCRIPTION π§
so what does she do? she builds the tables that can represent the available scales and the available integration times. the availability tables are built based on the originally given gain and given time tables β like, they come from what you handed her, no cap.
and when both the time table and the gain table are given? this is what you get, bestie:
- a set of sorted tables representing available scales for each supported integration time π
- a single sorted table listing all the unique scales that any combination of supported gains and times can provide π«
- a sorted table of supported integration times β
and after these tables are built?? you can use the iio_gts_all_avail_scales, iio_gts_avail_scales_for_time, and iio_gts_avail_times helpers to implement the read_avail operations. slay. π«Ά
π NOTE π
β οΈ okay this part matters, don't skip it: the space allocated for the tables must be freed using iio_gts_purge_avail_tables when the tables are no longer needed. like, that memory is not gonna clean itself up. free her. periodt. π
π₯ RETURN π₯
0 on success. β¨ that's the only return value listed and honestly? we love a simple queen.
π SEE ALSO π
so many friends, so many cross-references, let's go through the whole group chat π :
- 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_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_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)
and that's the whole page, babe!! π big kiss from ./drivers/iio, dated October 2026 β go build those tables and remember to free them πβ¨π
π¦ 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