History

usb: gadget: ffs: add eventfd notification about ffs events

Add eventfd which notifies userspace about ep0 events and AIO completion events. It simplifies using of FunctionFS with event loop, because now we need to poll on single file (instead of polling on ep0 and eventfd's supplied to AIO layer). FunctionFS eventfd is not triggered if another eventfd is supplied to AIO layer (in AIO request). It can be useful, for example, when we want to handle AIO transations for chosen endpoint in separate thread.

Robert Baldyga committed 11 years ago

Commit 5e33f6f1 parent acba23f3 files · +30 −1Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/usb/functionfs.h+1−0
@@ -20,6 +20,7 @@ enum functionfs_flags { · 19 unmodified lines
2020 FUNCTIONFS_HAS_SS_DESC = 4,
2121 FUNCTIONFS_HAS_MS_OS_DESC = 8,
2222 FUNCTIONFS_VIRTUAL_ADDR = 16,
23+ FUNCTIONFS_EVENTFD = 32,
2324 };
2425
2526 /* Descriptor of an non-audio endpoint */