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

Commit 75d2f754 authored by Li Jun's avatar Li Jun Committed by Felipe Balbi
Browse files

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: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 2dfb46be
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);