gain_get_scale_fraction(9)
๐ gain_get_scale_fraction(9)
okay so bestie, welcome to the Kernel API Manual โ this is a (9) page, which means it's a kernel-internal thing, not like a command you type. we're doing gain_get_scale_fraction today and honestly it's giving very "math girlie does driver plumbing" energy ๐งฎโจ
๐ธ NAME ๐ธ
gain_get_scale_fraction โ get the gain or time based on scale and known one ๐
like, you hand it a scale, you hand it the thing you already know, and it figures out the thing you don't. lowkey iconic.
โจ SYNOPSIS โจ
int gain_get_scale_fraction (const u64 max , u64 scale , int known , int
*unknown );
๐ฆ ARGUMENTS ๐ฆ
maxโ the maximum linearized scale. and like, the manpage gives the cutest example so i'm keeping it: whenscaleis created in magnitude of NANOs and max scale is 64.1 โ the linearized scale is64 100 000 000. no cap, that's a lot of zeroes ๐scaleโ the linearized scale we're computing the gain/time for. this is the main character input fr.knownโ either the integration time or the gain, depending on which one you already know. pick a lane, bestie ๐ซถunknownโ pointer to the variable where the computed gain/time gets stored ๐
๐ DESCRIPTION ๐
so this is an internal helper for computing the unknown fraction of the total gain. yes, internal โ it's not out here for public consumption, it's a behind-the-scenes situation ๐
what it does: compute either gain or time based on scale and either the gain or the time, depending on which one is known. that's it. that's the whole vibe. one known, one unknown, scale in the middle, slay ๐ฅ
๐ RETURN ๐
0 on success. that's the whole section, she's short and she knows it ๐
โญ SEE ALSO โญ
kernel file ./drivers/iio/industrialio-gts-helper.c โ that's where this lives, go snoop ๐ง
and here's the whole extended friend group, all (9)s, all here, all accounted for, i did not skip a single one because i would never ๐ค:
iio_gts_get_gain(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_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 page!! ๐ this little cutie shipped out of ./drivers/iio, dated October 2026, under the very glamorous title gain_get_scale_fraction(9). go forth and linearize your scales bestie, ily ๐๐ฆ
๐ฆ 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