Skip to content

Commit

Permalink
usb: cdns3: core: quit if it uses role switch class
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and felipebalbi committed Oct 2, 2020
1 parent a609ce2 commit 5064270
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/cdns3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5064270

Please sign in to comment.