• Tomoya MORINAGA's avatar
    usb: gadget: pch_udc: Detecting VBUS through GPIO · dd63180b
    Tomoya MORINAGA authored
    Problem:
     In USB Suspend, pch_udc handles 'disconnect'.
    
    Root cause:
     The current pch_udc is not monitoring VBUS.
     When USB cable is disconnected, USB Device Controller generates
     an interrupt of USB Suspend.
     pch_udc cannot distinguish it is USB Suspend or disconnect.
     Therefore, pch_udc handles 'disconnect' after an interrupt of
     USB Suspend happend.
    
    Solution:
     VBUS is detected through GPIO.
     After an interrupt produced USB Suspend, if VBUS is Low,
     pch_udc handles 'disconnect'.
     If VBUS is High, pch_udc handles 'suspend'.
    Signed-off-by: default avatarTomoya MORINAGA <tomoya.rohm@gmail.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    dd63180b
pch_udc.c 87.7 KB