iio_get_current_scan_type(9)
π
iio_get_current_scan_type β from the Kernel API Manual, bestie β¨
okay so this is a page straight out of the Kernel API Manual, and it's about one (1) little function that answers one (1) little question: what scan type is this channel on right now? π it's short, it's sweet, it's giving "small but mighty," periodt.
β¨ NAME β¨
iio_get_current_scan_type β get the current scan type for a channel πΈ
π¦ SYNOPSIS π¦
const struct iio_scan_type * iio_get_current_scan_type (const struct
iio_dev *indio_dev , const struct iio_chan_spec *chan );
like, it returns a const struct iio_scan_type * and takes exactly two things. that's it. no drama, no cap π
π«Ά ARGUMENTS π«Ά
indio_devβ the IIO device you want the scan type for. the whole device, the main character πchanβ the channel you want the scan type for. the specific lil guy inside that device π
π DESCRIPTION π
so here's the tea β β most devices only have one scan type per channel, right? and for those, you can literally just access it directly, no function call needed. no cap. skip the middleman, live your truth β¨
but the core IIO code β and any driver that implements ext_scan_type in the channel spec β should use this function to get the current scan type for a channel. that's the whole vibe check. it's the correct way for those particular folks, and iykyk π«
π₯ RETURN π₯
it hands you back the current scan type for the channel, or an error. that's it, that's the return. π
lowkey important: it's returning either the scan type or an error β so, like, please check which one you got before you go dereferencing anything, bestie π
β SEE ALSO β
the references section is long β she ate and left no crumbs π β and there's also a Kernel file pointer at ./include/linux/iio/iio.h. anyway, here's every single one of them, exactly as they come:
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_info(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_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)
and that's the whole page, bestie, you understood it perfectly π this one came from ./include/linux/iio and it's dated October 2026 β so go forth, get that scan type, 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