iio_write_channel_raw(9)
β¨ iio_write_channel_raw(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this is the page for iio_write_channel_raw(9), and honestly? it's a whole little icon. let's get into it π¦
πΈ NAME πΈ
iio_write_channel_raw β write to a given channel. that's it, that's the vibe π
β SYNOPSIS β
int iio_write_channel_raw (struct iio_channel *chan , int val );
π ARGUMENTS π
chanβ the channel being queried π like, this is the one you're talking to.valβ value being written βοΈ the actual number going in.
π¦ DESCRIPTION π¦
okay so this is the part you actually need to read, bestie, don't skip it π
note that for raw writes to iio channels β if the value you're providing is in standard units β you gotta remove the effect of the scale and offset first. the way that works is:
(value / scale) - offset
that's the formula, periodt. no cap. π
π SEE ALSO π
literally the whole friend group π«Ά all these:
- Kernel file
./include/linux/iio/consumer.h 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_read_max_channel_raw(9)iio_read_min_channel_raw(9)iio_read_avail_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!! π tysm for reading, this was ./include/linux/iio, October 2026 edition, mwah π go write some raw channel values bestie, you're gonna 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