current_trigger_store(9)
β¨ current_trigger_store β¨
okay bestie, so we're deep in the Kernel API Manual today β this one's a (9) page, so it's kernel-internal vibes only, no userland shenanigans. it's giving "IIO trigger consumer sysfs set current trigger," and honestly? kind of iconic.
πΈ SYNOPSIS πΈ
ssize_t current_trigger_store (struct device *dev , struct
device_attribute *attr , const char *buf , size_t len );
literal queen behavior: a store callback that takes four things and hands you back a ssize_t. slay.
π ARGUMENTS π
devβ the device that's associated with an industrial I/O device. your main character device, basically πattrβ the device attribute that's being processed rn. it's the thing that got poked.bufβ the string buffer holding the name of the trigger. that's the name, right there, in a buffer π«Άlenβ length of the trigger name thatbufis holding. how many chars we're working with, fr fr.
π¦ DESCRIPTION π¦
okay so for trigger consumers, the current_trigger interface is the whole moment. it lets you specify, at run time, which trigger gets used for this device β and you do it based on the trigger's name. no cap, that's the entire vibe: name goes in, trigger gets picked, runtime config unlocked β¨
π₯ RETURN π₯
- negative error code on failure π
- length of the buffer on success π
π SEE ALSO π
all the siblings in the Kernel file ./drivers/iio/industrialio-trigger.c β go say hi to the whole fam:
name_show(9)iio_trigger_poll(9)iio_trigger_poll_nested(9)current_trigger_show(9)__iio_trigger_alloc(9)__devm_iio_trigger_alloc(9)devm_iio_trigger_register(9)iio_validate_own_trigger(9)iio_trigger_validate_own_device(9)
and that's the whole page, bestie π§ no skips, no crumbs left behind.
cute lil sign-off: this one lives in ./drivers/iio, and the page itself is dated October 2026 β like, future-coded but make it kernel π
ily, go read current_trigger_show(9) next, it's literally the other half of this duo π
π¦ 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