iio_read_avail_channel_raw(9)
π iio_read_avail_channel_raw π
okay so bestie, this is a page from the Kernel API Manual (the iio_read_avail_channel_raw(9) one, yes the name is a mouthful, we love her anyway π«Ά), and it's genuinely so useful β it's all about reading the available raw values from a given channel. let's get into it β¨
πΈ NAME πΈ
iio_read_avail_channel_raw β read available raw values from a given channel π
β¨ SYNOPSIS β¨
int iio_read_avail_channel_raw (struct iio_channel *chan , const int
**vals , int *length );
π ARGUMENTS π
chanβ the channel you're querying, bestie. that's the one you're asking about πvalsβ the available values get read back into here, so this is where the good stuff lands π¦lengthβ how many entries are chillin' invalsπ
π DESCRIPTION π
so this function returns an error code, IIO_AVAIL_RANGE or IIO_AVAIL_LIST. those are your two moods, no in-between π
for ranges, three vals are always returned β min, step and max. that's the whole trio, periodt π₯
for lists, all the possible values are enumerated β like every single one, she's thorough like that π
β οΈ note note note: if you need standard units, those raw available values from iio channels need the offset (default0) and scale (default1) applied, and the formula is literally(raw + offset) * scale. don't forget the parentheses, i'm begging π
π¦ SEE ALSO π¦
the whole friend group, gathered for the occasion π β kernel file ./include/linux/iio/consumer.h and:
struct iio_channel(9)iio_channel_get(9)iio_channel_release(9)devm_iio_channel_get(9)iio_channel_get_all(9)iio_channel_release_all(9)devm_iio_channel_get_all(9)fwnode_iio_channel_get_by_name(9)devm_fwnode_iio_channel_get_by_name(9)iio_channel_get_all_cb(9)iio_channel_cb_set_buffer_watermark(9)iio_channel_release_all_cb(9)iio_channel_start_all_cb(9)iio_channel_stop_all_cb(9)iio_channel_cb_get_channels(9)iio_channel_cb_get_iio_dev(9)iio_read_channel_raw(9)iio_read_channel_average_raw(9)iio_read_channel_processed(9)iio_read_channel_processed_scale(9)iio_write_channel_attribute(9)iio_read_channel_attribute(9)iio_write_channel_raw(9)iio_read_max_channel_raw(9)iio_read_min_channel_raw(9)iio_read_avail_channel_attribute(9)iio_get_channel_type(9)iio_read_channel_offset(9)iio_read_channel_scale(9)iio_multiply_value(9)iio_convert_raw_to_processed(9)iio_get_channel_ext_info_count(9)iio_read_channel_ext_info(9)iio_write_channel_ext_info(9)iio_read_channel_label(9)
and that's the page, babe π this lil gem came straight out of ./include/linux/iio, dated October 2026 β so go forth, read those available values, and slay β¨π
π¦ 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