提交 50642709 编写于 作者: P Peter Chen 提交者: Felipe Balbi

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: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
上级 a609ce2a
...@@ -280,6 +280,10 @@ int cdns3_hw_role_switch(struct cdns3 *cdns) ...@@ -280,6 +280,10 @@ int cdns3_hw_role_switch(struct cdns3 *cdns)
enum usb_role real_role, current_role; enum usb_role real_role, current_role;
int ret = 0; int ret = 0;
/* Depends on role switch class */
if (cdns->role_sw)
return 0;
pm_runtime_get_sync(cdns->dev); pm_runtime_get_sync(cdns->dev);
current_role = cdns->role; current_role = cdns->role;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册