diff options
author | Li Jun <jun.li@nxp.com> | 2016-02-19 05:04:46 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 16:14:37 +0300 |
commit | 75d2f754e2d8937890336803ae27e3503f192705 (patch) | |
tree | 7e973eef9c96f904128e77f5ca7fb1efdb471ffd /drivers/usb/chipidea | |
parent | 2dfb46be1a231888e8d51b97573f592e408d5199 (diff) | |
download | linux-75d2f754e2d8937890336803ae27e3503f192705.tar.xz |
usb: chipidea: otg: enable HNP polling support for gadget and host
Enable HNP polling support for chipidea gadget and allocate memory
for host request flag when otg fsm init.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index cb28e763f0b8..9a963a749467 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -797,6 +797,10 @@ int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci) ci->fsm.id = hw_read_otgsc(ci, OTGSC_ID) ? 1 : 0; ci->fsm.otg->state = OTG_STATE_UNDEFINED; ci->fsm.ops = &ci_otg_ops; + ci->gadget.hnp_polling_support = 1; + ci->fsm.host_req_flag = devm_kzalloc(ci->dev, 1, GFP_KERNEL); + if (!ci->fsm.host_req_flag) + return -ENOMEM; mutex_init(&ci->fsm.lock); |