OSDN Git Service

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)
commit5e33f6fdf735cda1d4580fe6f1878da05718fe73
tree7e6e041131600b431ab284118750a7539245a43a
parentacba23fec527012e901636e4ba091ee25461c943
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