Skip to content

Commit

Permalink
usb: chipidea: add ci->is_otg condition for otg judgement
Browse files Browse the repository at this point in the history
Since some chipidea based controller is not otg capable, add ci->is_otg
condition when setting is_otg flag for gadget.

Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Li Jun authored and Felipe Balbi committed Aug 3, 2015
1 parent a24b071 commit 3f217e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f217e9

Please sign in to comment.