• Grazvydas Ignotas's avatar
    usb: phy: twl4030-usb: poll for ID disconnect · 249751f2
    Grazvydas Ignotas authored
    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: default avatarGrazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    249751f2
phy-twl4030-usb.c 20.3 KB