OSDN Git Service

usb: phy: twl4030-usb: poll for ID disconnect
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 17 Mar 2013 18:23:24 +0000 (20:23 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 21 Mar 2013 12:20:30 +0000 (14:20 +0200)
commit249751f22380386042056cce6a73c934f5b942a3
tree4bf864c472d2476cd48245de9b0d61183f23485e
parent15460de7f3d9cf0846af1cfdb4a3995d2f270ce7
usb: phy: twl4030-usb: poll for ID disconnect

On pandora, STS_USB interrupt doesn't arrive on USB host cable disconnect
for some reason while VBUS is driven by twl itself, but STS_HW_CONDITIONS
is updated correctly. It does work fine when PHY is powered down though.
To work around that we have to poll.

This patch also moves twl->linkstat update code to callers so that
changes can be handled in thread safe way (as polling work can trigger
at the same time as real irq now).

TI PSP kernels have similar workarounds, so (many?) more boards are likely
affected.

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