diff options
author | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2017-01-16 13:35:17 +0530 |
---|---|---|
committer | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2017-01-16 13:39:17 +0530 |
commit | 3759fd1701383e8178b00494cc8176e7f4ec1d5e (patch) | |
tree | 844a6c43b9ff80e796977076e97ce860c05bf533 /drivers/usb/dwc3/dwc3-msm.c | |
parent | 2f817b68f06ed866aa2c4cc35b2e4293aeb1ef99 (diff) |
USB: dwc3-msm: Set speed as high speed if no speed information
Speed is not notified in case of platforms having micro USB connector
instead of USB type C connector. In this case, set speed as High speed
only as by default only high speed is supported over micro USB ports.
Change-Id: I6f29914ca9e2345157330651464b7a0c151f1f97
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-msm.c')
-rw-r--r-- | drivers/usb/dwc3/dwc3-msm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index db74e4f4f4d9..4d38cb515f0e 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -2574,7 +2574,7 @@ static int dwc3_msm_id_notifier(struct notifier_block *nb, dbg_event(0xFF, "cc_state", mdwc->typec_orientation); speed = extcon_get_cable_state_(edev, EXTCON_USB_SPEED); - dwc->maximum_speed = (speed == 0) ? USB_SPEED_HIGH : USB_SPEED_SUPER; + dwc->maximum_speed = (speed <= 0) ? USB_SPEED_HIGH : USB_SPEED_SUPER; if (mdwc->id_state != id) { mdwc->id_state = id; @@ -2615,7 +2615,7 @@ static int dwc3_msm_vbus_notifier(struct notifier_block *nb, dbg_event(0xFF, "cc_state", mdwc->typec_orientation); speed = extcon_get_cable_state_(edev, EXTCON_USB_SPEED); - dwc->maximum_speed = (speed == 0) ? USB_SPEED_HIGH : USB_SPEED_SUPER; + dwc->maximum_speed = (speed <= 0) ? USB_SPEED_HIGH : USB_SPEED_SUPER; mdwc->vbus_active = event; if (dwc->is_drd && !mdwc->in_restart) { |