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)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 11 Apr 2017 07:58:30 +0000 (10:58 +0300)
commit41ce1456e1dbbc7355d0fcc10cf7c337c13def24
treef5e52d7040ff415c60dceb757f598b5dc2330883
parentb202c42cbf812070ae1d47209d12512226d1d8a5
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