STRUCT IIO_POLL_FUNC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct iio_poll_func(9) ✨

okay bestie, so this is straight out of the Kernel API Manual πŸ’… β€” it's the little struct that pairs up your poll functions for IIO, and honestly? it's giving "tiny but crucial." let's get into it 🫢


🌸 NAME 🌸

struct iio_poll_func β€” the poll function pair ✨ like, literally a pair. the function + its threaded buddy. iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct iio_poll_func {
    struct iio_dev *indio_dev;
    irqreturn_t (*h)(int irq, void *p);
    irqreturn_t (*thread)(int irq, void *p);
    int type;
    char *name;
    int irq;
    s64 timestamp;
 };

no cap, that's the whole struct πŸ‘‘ copy it exactly, don't be out here renaming fields bestie 😭


πŸŽ€ Members πŸŽ€

time for the vibe check on every single field, no skips, we're doing all of them πŸ”₯

  • indio_dev β€” the data that's specific to the device, and yes it gets passed into the poll func πŸ’–
  • h β€” the function that's actually run on trigger. like, the main character of the whole operation ✨
  • thread β€” the threaded interrupt part 🧡 (you know, the part that runs in thread context)
  • type β€” the type of interrupt; basically whether it's oneshot or not πŸ™ˆ
  • name β€” the name used to identify the trigger consumer. it's the nametag at the party πŸŽ€
  • irq β€” the corresponding irq as allocated from the trigger pool ⭐
  • timestamp β€” okay so some devices need a timestamp grabbed as soon as possible after the trigger β€” that's why the handler passes it through here πŸ’€ like "grab it now or lose it" energy fr fr
real talk: timestamp exists because the moment matters 🌈 the handler drops it here so it doesn't get lost in the sauce.

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./include/linux/iio/trigger_consumer.h πŸ‘€ go read it, iykyk

that's the whole page bestie, go forth and trigger responsibly 🌸

✧ο½₯゚: * sign-off time * :゚ο½₯✧ this lil' gem lives under ./include/linux/iio 🌸 and it was dated October 2026 β€” so yeah, future-timestamped and thriving πŸ’… periodt.

πŸ“¦ where this page comes from