Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li Jun and committed by
Felipe Balbi
75d2f754 2dfb46be

+4
+4
drivers/usb/chipidea/otg_fsm.c
··· 797 797 ci->fsm.id = hw_read_otgsc(ci, OTGSC_ID) ? 1 : 0; 798 798 ci->fsm.otg->state = OTG_STATE_UNDEFINED; 799 799 ci->fsm.ops = &ci_otg_ops; 800 + ci->gadget.hnp_polling_support = 1; 801 + ci->fsm.host_req_flag = devm_kzalloc(ci->dev, 1, GFP_KERNEL); 802 + if (!ci->fsm.host_req_flag) 803 + return -ENOMEM; 800 804 801 805 mutex_init(&ci->fsm.lock); 802 806