iio_gts_total_gain_to_scale(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, this is the iio_gts_total_gain_to_scale(9) page from the Kernel API Manual, and its whole thing is convert gain to scale. literally the function name says it all. πŸ’…

✨ SYNOPSIS ✨

the signature is giving:

int iio_gts_total_gain_to_scale (struct iio_gts *gts , int total_gain ,
       int *scale_int , int *scale_nano );

🌸 ARGUMENTS 🌸

  • gts β€” the gain time scale descriptor, aka the main character struct. πŸ‘‘
  • total_gain β€” the gain that's getting converted, fr fr.
  • scale_int β€” pointer to the integral part of the scale (typically val1).
  • scale_nano β€” pointer to the fractional part of the scale (nano or ppb).

πŸ¦‹ DESCRIPTION πŸ¦‹

So this cutie converts the total gain value to scale. that's the vibe. ✨

NOTE: this does not separate gain generated by HW-gain or integration time. It is up to caller to decide what part of the total gain is due to integration time and what due to HW-gain. ⚠️

like, that split is not this function's job β€” the caller has to figure out which part is which. no cap.

πŸ”₯ RETURN πŸ”₯

0 on success. Negative errno on failure. slay when it's zero, weep when it's negative. 😭

πŸ’œ SEE ALSO πŸ’œ

Kernel file: ./drivers/iio/industrialio-gts-helper.c β€” go peek, bestie. πŸ‘€ then these related icons:


πŸ’– that's the whole page, bestie. source/version: ./drivers/iio; date: October 2026. catch you in the next manpage! 🫢

πŸ“¦ where this page comes from