Skip to Content
Linux Device Drivers Development
book

Linux Device Drivers Development

by John Madieu
October 2017
Intermediate to advanced
586 pages
14h 8m
English
Packt Publishing
Content preview from Linux Device Drivers Development

add_trigger file

This is used to create a new sysfs trigger. You can create a new trigger by writing a positive value (which will be used as a trigger ID) into that file. It will create the new sysfs trigger, accessible at /sys/bus/iio/devices/triggerX, where X is the trigger number, for example:

 # echo 2 > add_trigger 

This will create a new sysfs trigger, accessible at /sys/bus/iio/devices/trigger2. If the trigger with the specified ID is already present in the system, an invalid argument message will be returned. The sysfs trigger name pattern is sysfstrig{ID}. The echo 2 > add_trigger command will create the trigger /sys/bus/iio/devices/trigger2, whose name is sysfstrig2:

 $ cat /sys/bus/iio/devices/trigger2/name
 sysfstrig2  

Each sysfs ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Device Drivers, Second Edition

Linux Device Drivers, Second Edition

Jonathan Corbet, Alessandro Rubini
Linux Device Drivers, 3rd Edition

Linux Device Drivers, 3rd Edition

Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

Publisher Resources

ISBN: 9781785280009Supplemental Content