]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: ffs: add eventfd notification about ffs events
authorRobert Baldyga <r.baldyga@samsung.com>
Fri, 23 Jan 2015 12:41:01 +0000 (13:41 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 27 Jan 2015 15:34:59 +0000 (09:34 -0600)
commit341cd8857c8bfa080b2db70d3c08e0b82ab63162
tree7e6e041131600b431ab284118750a7539245a43a
parentdc7820babdf53c15125be67579fc155dc6fab4a8
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.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_fs.h
include/uapi/linux/usb/functionfs.h