usb: gadget: f_fs: add poll for endpoint 0
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 10 Feb 2014 09:42:43 +0000 (10:42 +0100)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:46:57 +0000 (11:46 +0900)
commitbfcdd725157b9e5a1a6927b118d43c7762f72db8
treeb5267f3beb4cabd23220c757187c919d3cad4c3b
parent7e71f505c946a97bcdfcb7077caa16bebacfeca1
usb: gadget: f_fs: add poll for endpoint 0

This patch adds poll function for file representing ep0.

Ability of read from or write to ep0 file is related with actual state of ffs:
- When desctiptors or strings are not written yet, POLLOUT flag is set.
- If there is any event to read, POLLIN flag is set.
- If setup request was read, POLLIN and POLLOUT flag is set, to allow
  send response (by performing I/O operation consistent with setup request
  direction) or set stall (by performing I/O operation opposite  setup
  request direction).

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
drivers/usb/gadget/f_fs.c