Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f217e9e authored by Li Jun's avatar Li Jun Committed by Felipe Balbi
Browse files

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: default avatarLi Jun <jun.li@freescale.com>
Reviewed-by: default avatarRoger Quadros <rogerq@ti.com>
Acked-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a24b071b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);