• John Stultz's avatar
    usb: dwc2: Fix UDC state tracking · ce2b21a4
    John Stultz authored
    It has been noticed that the dwc2 udc state reporting doesn't
    seem to work (at least on HiKey boards). Where after the initial
    setup, the sysfs /sys/class/udc/f72c0000.usb/state file would
    report "configured" no matter the state of the OTG port.
    
    This patch adds a call so that we report to the UDC layer when
    the gadget device is disconnected.
    
    This patch does depend on the previous patch ("usb: dwc2:
    Improve gadget state disconnection handling") in this patch set
    in order to properly work.
    
    Cc: Wei Xu <xuwei5@hisilicon.com>
    Cc: Guodong Xu <guodong.xu@linaro.org>
    Cc: Amit Pundir <amit.pundir@linaro.org>
    Cc: YongQin Liu <yongqin.liu@linaro.org>
    Cc: John Youn <johnyoun@synopsys.com>
    Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
    Cc: Douglas Anderson <dianders@chromium.org>
    Cc: Chen Yu <chenyu56@huawei.com>
    Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: linux-usb@vger.kernel.org
    Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
    Tested-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
    Reported-by: default avatarAmit Pundir <amit.pundir@linaro.org>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    ce2b21a4
gadget.c 127 KB