iio_gts_find...ain_time_min(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iio_gts_find_new_gain_by_gain_time_min(9) πŸ’…

okok so real talk β€” this is a page from the Kernel API Manual, and it's literally the whole iio_gts_find...ain_time_min(9) situation. bestie, grab a strawberry drink πŸ“, we're getting into gain/time scale brainrot and it's actually kind of iconic.


✨ NAME ✨

iio_gts_find_new_gain_by_gain_time_min β€” compensate for time change. that's it, that's the vibe πŸ¦‹


🌸 SYNOPSIS 🌸

int iio_gts_find_new_gain_by_gain_time_min (struct iio_gts *gts , int
old_gain , int old_time , int new_time , int *new_gain , bool *in_range
);

bestie look at that signature it's giving six whole parameters and not one of them is optional 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • gts β€” Gain time scale descriptor. this is the main character, the whole context lives in here πŸ‘‘
  • old_gain β€” Previously set gain. yes, the gain that was already chilling there before.
  • old_time β€” Selector corresponding previously set time. which time slot we were on before, lowkey.
  • new_time β€” Selector corresponding new time to be set. the new time slot we're moving to, slay.
  • new_gain β€” Pointer to value where new gain is to be written. it's a pointer, so we're writing through it, no cap πŸ’…
  • in_range β€” Indicate if the new_gain was in the range of supported gains. it tells you whether the result actually stayed inside the supported-gain zone or not. important!!

πŸ’– DESCRIPTION πŸ’–

so this function is a wrapper around iio_gts_find_new_gain_by_old_gain_time. like, it's the cuter, more helpful outer layer 🫢

what it does: it tries to set an optimal value if no exact match was found, and it defaults to the minimum gain to avoid saturations if that optimal value is not in the range of supported gains. so basically it never leaves you hanging β€” worst case it plays it safe with min gain instead of letting things saturate. genuinely obsessed with the safety net ngl ✨

the "avoid saturations" part is not decorative, bestie β€” that's the whole reason it falls back to minimum gain, so don't sleep on it πŸ™ˆ

⭐ RETURN ⭐

0 on success, and a negative value if no gain was found. so like... zero is the slay outcome, negative is the "it's not giving" outcome πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

all the siblings and cousins live in the kernel file ./drivers/iio/industrialio-gts-helper.c, and here's the full friend group, no one gets left out:


and that's the whole page, bestie!! 🧚 this one came from ./drivers/iio and it's dated October 2026 β€” write that in your notes, periodt πŸ’œ

πŸ“¦ where this page comes from