devm_iio_trigger_register(9)
π devm_iio_trigger_register(9) π
okay bestie, welcome to the Kernel API Manual β this one's short and sweet, no cap. it's the resource-managed glow-up of iio_trigger_register(), and honestly? iconic behaviour. β¨
πΈ NAME πΈ
devm_iio_trigger_register β it's iio_trigger_register(), but make it resource-managed. the devm version. the one that cleans up after itself. π§Ή
π SYNOPSIS π
int devm_iio_trigger_register (struct device *dev , struct iio_trigger
*trig_info );
two args, one int coming back at you. that's the whole vibe check. π¦
β¨ ARGUMENTS β¨
devβ thestruct device *this trigger was allocated for. like, whose trigger is this? this one's. π«Άtrig_infoβ thestruct iio_trigger *you actually wanna register. the trigger in question. the main character. π
π DESCRIPTION π
so here's the tea: this is the managed iio_trigger_register. the IIO trigger you register through this function gets automatically unregistered on driver detach β no manual cleanup era, we love a self-sufficient queen. π
internally it straight up calls iio_trigger_register (fr fr, that's where the real work happens). so if you want the full lore, go read that function β this page is literally just the devm wrapper telling you it exists. π
π₯ RETURN π₯
0on success β slay, you did it π- a negative error number on failure β not slay, go check the errno π
π¦ SEE ALSO π¦
Kernel file ./drivers/iio/industrialio-trigger.c β plus the whole friend group:
name_show(9)iio_trigger_poll(9)iio_trigger_poll_nested(9)current_trigger_show(9)current_trigger_store(9)__iio_trigger_alloc(9)__devm_iio_trigger_alloc(9)iio_validate_own_trigger(9)iio_trigger_validate_own_device(9)
lowkey reminder bestie: the auto-unregister only happens because it's devm-flavoured. that's the entire point. don't come crying if you used the non-managed one and forgot to clean up π
β okay that's the page!! brought to you by the <pink>./drivers/iio</pink> girlies, October 2026 edition, devm_iio_trigger_register(9) forever and always πππ
π¦ 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