diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/ux500.c | 1 | ||||
-rw-r--r-- | drivers/usb/otg/ab8500-usb.c | 23 |
2 files changed, 15 insertions, 9 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index d0bfd2ffdc9..bae06ec7d67 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c @@ -225,6 +225,7 @@ static int musb_otg_notifications(struct notifier_block *nb, switch (event) { case USB_EVENT_ID: + case USB_EVENT_RIDA: dev_dbg(musb->controller, "ID GND\n"); if (is_otg_enabled(musb)) { ux500_musb_set_vbus(musb, 1); diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index 34aef32e104..19446ba114d 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c @@ -317,10 +317,11 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab) lsts = (reg >> 3) & 0x0F; switch (lsts) { + case USB_LINK_ACA_RID_B: + event = USB_EVENT_RIDB; case USB_LINK_NOT_CONFIGURED: case USB_LINK_RESERVED: case USB_LINK_NOT_VALID_LINK: - case USB_LINK_ACA_RID_B: if (ab->mode == USB_HOST) ab8500_usb_host_phy_dis(ab); else if (ab->mode == USB_PERIPHERAL) @@ -328,18 +329,19 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab) ab->mode = USB_IDLE; ab->otg.default_a = false; ab->vbus_draw = 0; - event = USB_EVENT_NONE; + if (event != USB_EVENT_RIDB) + event = USB_EVENT_NONE; break; - + case USB_LINK_ACA_RID_C_NM: + case USB_LINK_ACA_RID_C_HS: + case USB_LINK_ACA_RID_C_HS_CHIRP: + event = USB_EVENT_RIDC; case USB_LINK_STD_HOST_NC: case USB_LINK_STD_HOST_C_NS: case USB_LINK_STD_HOST_C_S: case USB_LINK_HOST_CHG_NM: case USB_LINK_HOST_CHG_HS: case USB_LINK_HOST_CHG_HS_CHIRP: - case USB_LINK_ACA_RID_C_NM: - case USB_LINK_ACA_RID_C_HS: - case USB_LINK_ACA_RID_C_HS_CHIRP: if (ab->mode == USB_HOST) { ab->mode = USB_PERIPHERAL; ab8500_usb_host_phy_dis(ab); @@ -351,11 +353,13 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab) ux500_restore_context(); ab8500_usb_peri_phy_en(ab); } - event = USB_EVENT_VBUS; + if (event != USB_EVENT_RIDC) + event = USB_EVENT_VBUS; break; - case USB_LINK_HM_IDGND: case USB_LINK_ACA_RID_A: + event = USB_EVENT_RIDA; + case USB_LINK_HM_IDGND: if (ab->mode == USB_PERIPHERAL) { ab->mode = USB_HOST; ab8500_usb_peri_phy_dis(ab); @@ -368,7 +372,8 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab) ab8500_usb_host_phy_en(ab); } ab->otg.default_a = true; - event = USB_EVENT_ID; + if (event != USB_EVENT_RIDA) + event = USB_EVENT_ID; break; case USB_LINK_DEDICATED_CHG: |