diff options
author | Li Jun <jun.li@freescale.com> | 2015-07-31 10:41:00 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-08-03 10:02:46 -0500 |
commit | 3f217e9e96daa3d7741bab705fe9c7798d9951a9 (patch) | |
tree | 1babe63d3d5e33c8ced22e7835308de71bed9cc6 | |
parent | a24b071bb4ac37ef51a0ed4765f89be05a617677 (diff) | |
download | op-kernel-dev-3f217e9e96daa3d7741bab705fe9c7798d9951a9.zip op-kernel-dev-3f217e9e96daa3d7741bab705fe9c7798d9951a9.tar.gz |
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: 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>
-rw-r--r-- | drivers/usb/chipidea/udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b7cca3e..f5fbe78 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -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); |