usb: dwc3: core: make dwc3_set_mode() work properly
authorRoger Quadros <rogerq@ti.com>
Tue, 4 Apr 2017 09:49:18 +0000 (12:49 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:47 +0000 (15:36 -0500)
commit64810ed2330717877e2c73d8c3d6727b3cbfcb92
treea0310e06293282691a205965bafcf5c78e09f584
parentf6b6989d8fb3f64b0f6514f57b352fefcf7472c8
usb: dwc3: core: make dwc3_set_mode() work properly

We can't have both Host and Peripheral roles active at the same time
because of one detail on DWC3: it shares the same memory area for both
Host and Peripheral registers.

When swapping roles we must reinitialize the new role every
time. Let's make sure this works for our debugfs interface.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/debugfs.c