提交 3f217e9e 编写于 作者: L Li Jun 提交者: Felipe Balbi

usb: chipidea: add ci->is_otg condition for otg judgement

Since some chipidea based controller is not otg capable, add ci->is_otg
condition when setting is_otg flag for gadget.
Signed-off-by: NLi Jun <jun.li@freescale.com>
Reviewed-by: NRoger Quadros <rogerq@ti.com>
Acked-by: NPeter Chen <peter.chen@freescale.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 a24b071b
......@@ -1838,8 +1838,8 @@ static int udc_start(struct ci_hdrc *ci)
ci->gadget.name = ci->platdata->name;
ci->gadget.otg_caps = otg_caps;
if (otg_caps->hnp_support || otg_caps->srp_support ||
otg_caps->adp_support)
if (ci->is_otg && (otg_caps->hnp_support || otg_caps->srp_support ||
otg_caps->adp_support))
ci->gadget.is_otg = 1;
INIT_LIST_HEAD(&ci->gadget.ep_list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册