aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen2020-09-01 10:33:48 +0800
committerFelipe Balbi2020-10-02 09:57:40 +0300
commit50642709f6590fe40afa6d22c32f23f5b842aed5 (patch)
tree919789eb6596300acd9462887ddeb858e8f4fe72
parenta609ce2a13360d639b384b6ca783b38c1247f2db (diff)
usb: cdns3: core: quit if it uses role switch class
If the board uses role switch class for switching the role, it should not depends on SoC OTG hardware siginal any more, so quit early. Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
-rw-r--r--drivers/usb/cdns3/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 4c1445cf2ad0..a0f73d4711ae 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -280,6 +280,10 @@ int cdns3_hw_role_switch(struct cdns3 *cdns)
enum usb_role real_role, current_role;
int ret = 0;
+ /* Depends on role switch class */
+ if (cdns->role_sw)
+ return 0;
+
pm_runtime_get_sync(cdns->dev);
current_role = cdns->role;