OSDN Git Service

usb: phy: msm: Trigger USB state detection work in DRD mode
authorIvan T. Ivanov <ivan.ivanov@linaro.org>
Fri, 5 Feb 2016 19:17:09 +0000 (19:17 +0000)
committerFelipe Balbi <balbi@kernel.org>
Tue, 23 Feb 2016 06:51:38 +0000 (08:51 +0200)
commit8de4b3a3fcbc18e0aa62e9defe5c08821351be12
tree8f010baa8c1bd80625b3f27207fd069e5d07b95a
parentca1c11894274c1687417945c034d6b8aee49f625
usb: phy: msm: Trigger USB state detection work in DRD mode

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: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/phy/phy-msm-usb.c