STRUCT IIO_TRIGGER(9)
π NAME π
okay bestie, welcome to struct iio_trigger(9) from the Kernel API Manual β itβs the industrial I/O trigger device page, and itβs giving kernel-internals main character energy. β¨
β¨ SYNOPSIS β¨
hereβs the exact struct layout, no cap β every field stays exactly where it belongs:
struct iio_trigger {
const struct iio_trigger_ops *ops;
struct module *owner;
int id;
const char *name;
struct device dev;
struct list_head list;
struct list_head alloc_list;
atomic_t use_count;
struct irq_chip subirq_chip;
int subirq_base;
struct iio_subirq subirqs[CONFIG_IIO_CONSUMERS_PER_TRIGGER];
unsigned long pool[BITS_TO_LONGS(CONFIG_IIO_CONSUMERS_PER_TRIGGER)];
struct mutex pool_lock;
bool attached_own_device;
struct work_struct reenable_work;
};
π Members π
member-by-member, bestie β keep those bracket tags exactly as they are:
opsβ [DRIVER] the operations structure. this is the driverβs whole blueprint vibe.ownerβ [INTERN] the owner of this driver module. internal business, but important.idβ [INTERN] the unique id number. everyone needs their own little number, fr fr.nameβ [DRIVER] the unique name. iconic, one-of-one behavior.devβ [DRIVER] the associated device, if relevant. not every trigger has one attached, and thatβs fine.listβ [INTERN] used in maintenance of the global trigger list. itβs on the master list, periodt.alloc_listβ [DRIVER] used for the driver specific trigger list. this oneβs for the driverβs own little group chat.use_countβ [INTERN] use count for the trigger. keeping track of whoβs using it rn.subirq_chipβ [INTERN] associate'virtual'irq chip. yes, virtual β itβs giving simulated irq energy.subirq_baseβ [INTERN] base number for irqs provided by the trigger. the starting number, basically.subirqsβ [INTERN] information about the'child'irqs. the little irq children, adorable.poolβ [INTERN] bitmap of irqs currently in use. whoβs taken and whoβs free, mapped out.pool_lockβ [INTERN] protection of the irq pool. gotta keep that pool safe from chaos.attached_own_deviceβ [INTERN] if we are using our own device as trigger, i.e. if we registered a poll function to the same device as the one providing the trigger. π«Άreenable_workβ [INTERN] work item used to ensure reenable can sleep. sleepy reenable? handled.
π¦ SEE ALSO π¦
go peek at these, iykyk:
- Kernel file
./include/linux/iio/trigger.h struct iio_trigger_ops(9)iio_trigger_set_drvdata(9)iio_trigger_get_drvdata(9)iio_trigger_register(9)iio_trigger_unregister(9)iio_trigger_set_immutable(9)iio_trigger_using_own(9)
okay thatβs the whole page, bestie π«Ά source/version: ./include/linux/iio Β· date: October 2026 Β· page: struct iio_trigger(9). 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