_IIO_EVENT_CODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _IIO_EVENT_CODE(9) β€” like, the Kernel API Manual page, bestie

okay so. this is a page from the Kernel API Manual and it's about one (1) macro that literally just builds an event identifier for you. it's giving "small but mighty" energy and honestly? we're obsessed. πŸŽ€


✨ NAME ✨

_IIO_EVENT_CODE β€” creates an event identifier. that's it. that's the whole job. ✨


🌸 SYNOPSIS 🌸

_IIO_EVENT_CODE (chan_type , diff , modifier , direction , type , chan ,
chan1 , chan2 );

look at all those args. a whole little buffet of parameters. no cap. πŸ“


πŸ¦‹ ARGUMENTS πŸ¦‹

every single one of these matters, so pay attention bestie:

  • chan_type β€” the type of the channel. it should be one of enum iio_chan_type. like, please don't freestyle this one. πŸ™ˆ
  • diff β€” tells you whether the event is for a differential channel or not. yes/no vibes.
  • modifier β€” the modifier for the channel. it should be one of enum iio_modifier. pick from the list, king. πŸ‘‘
  • direction β€” the direction of the event. one of enum iio_event_direction.
  • type β€” the type of the event. it should be one of enum iio_event_type.
  • chan β€” the channel number for non-differential channels. (so, the regular-girl channels πŸ’…)
  • chan1 β€” the first channel number for differential channels.
  • chan2 β€” the second channel number for differential channels. yes there are two of them, it's a whole duo, main character energy fr fr.

πŸ’– DESCRIPTION πŸ’–

so here's the tea: drivers should not be using this macro directly. like, at all. 🫢

drivers should use the specialized macros below instead. this one is more of a backstage, behind-the-scenes situation β€” the specialized ones are the ones out here actually living their lives. iykyk.


🌈 SEE ALSO 🌈

go read those too, bestie, they're literally iconic. πŸ”₯


okay that's the whole page!! this gem lives over in ./include/linux/iio, dated October 2026, and it slayed every step of the way. mwah. πŸ’œβœ¨

πŸ“¦ where this page comes from