usb: dwc3: Add dual-role support
authorRoger Quadros <rogerq@ti.com>
Wed, 5 Apr 2017 10:39:31 +0000 (13:39 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 11 Apr 2017 07:58:31 +0000 (10:58 +0300)
commit9840354ff429d4a392a96dff5ab6b5df609b8dc1
tree27cfaad3e008de499e821bf9ddf0d824345b06c0
parent41ce1456e1dbbc7355d0fcc10cf7c337c13def24
usb: dwc3: Add dual-role support

If dr_mode is "otg" then support dual role mode of operation.
Currently this mode is only supported when an extcon handle is
present in the dwc3 device tree node. This is needed to
get the ID status events of the port.

We're using a workqueue to manage the dual-role state transitions
as the extcon notifier (dwc3_drd_notifier) is called in an atomic
context by extcon_sync() and this doesn't go well with
usb_del_gadget_udc() causing a lockdep and softirq warning.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/Kconfig
drivers/usb/dwc3/Makefile
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/drd.c [new file with mode: 0644]