usb: phy: twl4030-usb: ignore duplicate events
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 17 Mar 2013 18:23:22 +0000 (20:23 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 21 Mar 2013 12:20:29 +0000 (14:20 +0200)
commitca4f70ce78de9a2fa09741f80cf7bda2f4256ecc
tree9f2f83a0ad8ca5d42f0ef7c659297d3ad03a63fd
parent44a50d088aad18a1a2709091bf25a108f967f8c9
usb: phy: twl4030-usb: ignore duplicate events

In some rare cases we may get multiple interrupts that will generate
duplicate omap_musb_mailbox() calls. This is a problem because each
VBUS/ID event generates runtime_pm call in OMAP glue code, causing
unbalanced gets or puts and breaking PM.

The same goes for initial state, glue already defaults to "no cable"
state, so only bother it if we have VBUS or ID.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-twl4030-usb.c