__iio_str_to_fixpoint(9)
π __iio_str_to_fixpoint(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little helper from the IIO subsystem and honestly? it's giving "tiny function, big job" energy. it takes a string and turns it into a fixed-point number, no cap π
πΈ NAME πΈ
__iio_str_to_fixpoint β Parse a fixed-point number from a string π¦
like, you hand it text, it hands you back actual numbers. iconic behavior fr fr π
β¨ SYNOPSIS β¨
int __iio_str_to_fixpoint (const char *str , int fract_mult , int
*integer , int *fract , bool scale_db );
that's the whole vibe, bestie β five params, one int coming back at you π
π ARGUMENTS π
strβ The string to parse π this is the raw text going in, the main character of the operationfract_multβ Multiplier for the first decimal place, should be a power of10β (so like, keep it a nice clean10,100,1000β¦ iykyk)integerβ The integer part of the number π₯ this is where the whole-number chunk landsfractβ The fractional part of the number π this is where the decimal-y bit ends upscale_dbβTrueif this should parse as dB π ok so if you're in decibel territory, this flag's for you
ngl bestie, fract_mult says "should be a power of 10" β that's the doc talking, so literally respect it, k? π
π RETURN π
0 on success π or a negative error code if the string could not be parsed π like if the input is cursed, you get a negative number back, not a crash. slay.
π¦ SEE ALSO π¦
Kernel file ./drivers/iio/industrialio-core.c β that's the home base π
and then the whole friend group, no one left out:
iio_device_id(9)iio_buffer_enabled(9)iio_find_channel_from_si(9)iio_device_set_clock(9)iio_device_get_clock(9)iio_get_time_ns(9)iio_read_mount_matrix(9)iio_format_value(9)iio_str_to_fixpoint(9)iio_free_chan_devattr_list(9)iio_device_alloc(9)iio_device_free(9)devm_iio_device_alloc(9)iio_chrdev_open(9)iio_chrdev_release(9)iio_active_scan_mask_index(9)iio_device_unregister(9)__iio_dev_mode_lock(9)__iio_dev_mode_unlock(9)iio_device_get_current_mode(9)
so yeah, that's the function π short page, but it ate. periodt. π
π§ source & version:./drivers/iioΒ· dated October 2026 Β· paged as__iio_str_to_fixpoint(9)β mwah, bye bestie π«Άβ¨
π¦ 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