usb: dwc3: Add dual-role support
authorRoger Quadros <rogerq@ti.com>
Wed, 5 Apr 2017 10:39:31 +0000 (13:39 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:48 +0000 (15:36 -0500)
commit3f64750962bf0a75c0cc2cc2666adf0a056b24a6
treed882764444e20b8062d1e0381bf69e035d5800b1
parent64810ed2330717877e2c73d8c3d6727b3cbfcb92
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]