提交 59739131 编写于 作者: L Loic Poulain 提交者: Peter Chen

usb: chipidea: Fix otg event handler

At OTG work running time, it's possible that several events need to be
addressed (e.g. ID and VBUS events). The current implementation handles
only one event at a time which leads to ignoring the other one. Fix it.
Signed-off-by: NLoic Poulain <loic.poulain@linaro.org>
Signed-off-by: NPeter Chen <peter.chen@nxp.com>
上级 8b97d73c
...@@ -203,14 +203,17 @@ static void ci_otg_work(struct work_struct *work) ...@@ -203,14 +203,17 @@ static void ci_otg_work(struct work_struct *work)
} }
pm_runtime_get_sync(ci->dev); pm_runtime_get_sync(ci->dev);
if (ci->id_event) { if (ci->id_event) {
ci->id_event = false; ci->id_event = false;
ci_handle_id_switch(ci); ci_handle_id_switch(ci);
} else if (ci->b_sess_valid_event) { }
if (ci->b_sess_valid_event) {
ci->b_sess_valid_event = false; ci->b_sess_valid_event = false;
ci_handle_vbus_change(ci); ci_handle_vbus_change(ci);
} else }
dev_err(ci->dev, "unexpected event occurs at %s\n", __func__);
pm_runtime_put_sync(ci->dev); pm_runtime_put_sync(ci->dev);
enable_irq(ci->irq); enable_irq(ci->irq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册