提交 984f753c 编写于 作者: R Richard Zhao 提交者: Greg Kroah-Hartman

USB: chipidea: acknowledge ID change interrupt in irq handler

In order to avoid re-queueing of the role changing work, we need to clear
the ID change interrupt bit right in the irq handler.
Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Tested-by: NMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: NRichard Zhao <richard.zhao@freescale.com>
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 86ad01a9
......@@ -273,8 +273,6 @@ static void ci_role_work(struct work_struct *work)
struct ci13xxx *ci = container_of(work, struct ci13xxx, work);
enum ci_role role = ci_otg_role(ci);
hw_write(ci, OP_OTGSC, OTGSC_IDIS, OTGSC_IDIS);
if (role != ci->role) {
dev_dbg(ci->dev, "switching from %s to %s\n",
ci_role(ci)->name, ci->roles[role]->name);
......@@ -325,6 +323,7 @@ static irqreturn_t ci_irq(int irq, void *data)
u32 sts = hw_read(ci, OP_OTGSC, ~0);
if (sts & OTGSC_IDIS) {
hw_write(ci, OP_OTGSC, OTGSC_IDIS, OTGSC_IDIS);
queue_work(ci->wq, &ci->work);
ret = IRQ_HANDLED;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册