iio_get_current_scan_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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