• Ivan T. Ivanov's avatar
    usb: phy: msm: Trigger USB state detection work in DRD mode · 8de4b3a3
    Ivan T. Ivanov authored
    When working in Dual Role Device mode, USB state machine is not kicked,
    when host or gadget drivers are loaded. Fix this be explicitly triggering
    state detection on client driver load.
    
    Issue is that if the board is booted without micro usb cable and usb
    device attached, kernel fails to populate the usb host and device.
    The reason for this is that the state machine worker logic only checks
    for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker
    thread. However if the phy is configured in OTG mode it would fail
    to run the state machine, resulting in failure to detect for very
    first time.
    
    This patch fixes the issue by removing the explicit checks.
    
    Issue is noticed on Qualcomm Dragon board DB410C.
    
    [srinivas.kandagatla@linaro.org: Added more details to log]
    Signed-off-by: default avatarIvan T. Ivanov <ivan.ivanov@linaro.org>
    Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    8de4b3a3
phy-msm-usb.c 48 KB