diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2012-09-12 14:58:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-12 11:20:38 -0700 |
commit | 984f753cf120db60d97271e34cf16c95761f0278 (patch) | |
tree | eab720420efdb324a0a2ae8b27e100820fb21121 /drivers/usb/chipidea | |
parent | 86ad01a907d7856edc07d8b49260c39520c0e932 (diff) | |
download | linux-984f753cf120db60d97271e34cf16c95761f0278.tar.bz2 |
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: Michael Grzeschik <m.grzeschik@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 3c3ed77a55bb..19ef3242cf43 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -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; } |