iio_channel_has_info(9)
β¨ iio_channel_has_info β¨
okay bestie, so this is a page out of the Linux Kernel API Manual, and it's about iio_channel_has_info β cute little helper that answers one very specific question for you: does this channel vibe with this info attribute or not? that's it, that's the whole gig π
πΈ NAME πΈ
iio_channel_has_info β checks whether a channel supports a info attribute
ngl the original says "a info" and i'm keeping it because it's iconic and i don't make the rules π
π¦ SYNOPSIS π¦
bool iio_channel_has_info (const struct iio_chan_spec *chan , enum
iio_chan_info_enum type );
like literally that's it. one bool coming right at you, two args going in. slay β¨
π ARGUMENTS π
chanβ the channel you're interrogating, bestie. it's aconst struct iio_chan_spec *and it's the thing being queried. be nice to it, it'sconst.typeβ the type of the info attribute you want checked. it's anenum iio_chan_info_enum, so pick your fave from the enum and let the function do its thing.
π DESCRIPTION π
okay so here's the tea π΅ β this function returns true if the channel supports reporting values for the given info attribute type, and false otherwise.
that's the whole personality. no side effects, no drama, just a clean true/false. main character energy honestly π
π SEE ALSO π
the whole friend group shows up for this one, no cap. these all live in the kernel file ./include/linux/iio/iio.h:
struct iio_chan_spec_ext_info(9)struct iio_enum(9)IIO_ENUM(9)IIO_ENUM_AVAILABLE(9)struct iio_mount_matrix(9)IIO_MOUNT_MATRIX(9)struct iio_event_spec(9)IIO_SCAN_FORMAT_SIGNED_INT(9)IIO_SCAN_FORMAT_UNSIGNED_INT(9)IIO_SCAN_FORMAT_FLOAT(9)struct iio_scan_type(9)struct iio_chan_spec(9)iio_channel_has_available(9)struct iio_info(9)struct iio_buffer_setup_ops(9)struct iio_dev(9)iio_device_register(9)devm_iio_device_register(9)iio_device_claim_direct(9)iio_device_release_direct(9)iio_device_try_claim_buffer_mode(9)iio_device_release_buffer_mode(9)IIO_DEV_ACQUIRE_DIRECT_MODE(9)IIO_DEV_ACQUIRE_FAILED(9)IIO_DEV_GUARD_CURRENT_MODE(9)iio_device_put(9)dev_to_iio_dev(9)iio_device_get(9)iio_device_set_parent(9)iio_device_set_drvdata(9)iio_device_get_drvdata(9)IIO_DECLARE_BUFFER_WITH_TS(9)IIO_DECLARE_DMA_BUFFER_WITH_TS(9)IIO_DECLARE_QUATERNION(9)iio_get_debugfs_dentry(9)iio_device_suspend_triggering(9)iio_device_resume_triggering(9)iio_get_current_scan_type(9)iio_get_masklength(9)iio_for_each_active_channel(9)IIO_DEGREE_TO_RAD(9)IIO_RAD_TO_DEGREE(9)IIO_G_TO_M_S_2(9)IIO_M_S_2_TO_G(9)
iykyk π«Ά
and that's the page!! π§ this little beauty lives in ./include/linux/iio and the version/date stamp on it says October 2026 β yes, the kernel docs are out here time-traveling and we respect it ππΈ go read your channels, bestie, ily, bye! ππ
π¦ 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