Skip to contentSkip to conversation

patch "usb: chipidea: udc: don't touch DP when controller is in host mode" added to usb-linus

PATCH [email protected] 1 participant 1 message Aug 30, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: chipidea: udc: don't touch DP when controller is in host mode

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From c4e94174983a86c935be1537a73e496b778b0287 Mon Sep 17 00:00:00 2001

From: Li Jun <[email protected]>
Date: Tue, 16 Aug 2016 19:19:11 +0800
Subject: usb: chipidea: udc: don't touch DP when controller is in host mode

When the controller is configured to be dual role and it's in host mode, if bind udc and gadgt driver, those gadget operations will do gadget disconnect and finally pull down DP line, which will break host function.

---
 drivers/usb/chipidea/udc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/chipidea/udc.c +5 -2
index 065f5d97aa67..dfec5a176315 100644
@@ -1596,8 +1596,11 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
 {
 	struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
 
-	/* Data+ pullup controlled by OTG state machine in OTG fsm mode */
-	if (ci_otg_is_fsm_mode(ci))
+	/*
+	 * Data+ pullup controlled by OTG state machine in OTG fsm mode;
+	 * and don't touch Data+ in host mode for dual role config.
+	 */
+	if (ci_otg_is_fsm_mode(ci) || ci->role == CI_ROLE_HOST)
 		return 0;
 
 	pm_runtime_get_sync(&ci->gadget.dev);
Signature · 1 line
2.9.3