STRUCT IIO_POLL_FUNC(9)
β¨ 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 correspondingirqas 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
- 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