Revert "UPSTREAM: usb: dwc3: core: Move the mode setting to the right place"
authorWilliam Wu <wulf@rock-chips.com>
Thu, 3 Nov 2016 10:03:45 +0000 (18:03 +0800)
committerWilliam Wu <wulf@rock-chips.com>
Thu, 3 Nov 2016 10:26:35 +0000 (18:26 +0800)
commiteca4625c95aee2677a626039f56fa93dcc127cb7
treea8f27424afb84668fb91bfd694f68d6ccff93122
parent143cafb285837c5b72e7352c24f6adf308c4b349
Revert "UPSTREAM: usb: dwc3: core: Move the mode setting to the right place"

This reverts commit 104756064072e39790eb16c5c987744e81d52a62.

This commit 1047560 will reinit dwc3 controller mode
when resuming dwc3 core. Generally, this patch can be
used for "dr_mode = host", "dr_mode = peripheral" and
"dr_mode = otg".

However, rockchip dwc3 core don't support otg function,
but only support DRD mode. So on rockchip platform, we
set dr_mode to otg for DRD mode, then switch host and
peripheral dynamically by extcon notifier. Also, we will
enable dwc3 to be a wakeup source and enable usb3 power
domain in suspend mode if usb device is pluged in. So
dwc3 controller will not lost the mode when resuming dwc3
core.

Change-Id: I0ee4f5b02d4504e853d8ef81df3df9a8a4ac284f
Signed-off-by: William Wu <wulf@rock-chips.com>
drivers/usb/dwc3/core.c