current_trigger_store(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 that buf is 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:


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