projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2918ad
)
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
author
Felipe Balbi
<balbi@ti.com>
Fri, 10 Oct 2014 20:24:00 +0000
(15:24 -0500)
committer
Felipe Balbi
<balbi@ti.com>
Mon, 3 Nov 2014 16:01:00 +0000
(10:01 -0600)
whenever we get a Disconnect Interrupt, we should
make sure to update out udc state to NOT_ATTACHED,
otherwise sysfs will show wrong values.
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index 748b87b3f98ad662874ad3a7df5e7666e3818587..12f42842da10230d6fda43a8a62c863fd6f23711 100644
(file)
--- a/
drivers/usb/dwc3/gadget.c
+++ b/
drivers/usb/dwc3/gadget.c
@@
-2140,6
+2140,7
@@
static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc)
dwc->gadget.speed = USB_SPEED_UNKNOWN;
dwc->setup_packet_pending = false;
+ usb_gadget_set_state(&dwc->gadget, USB_STATE_NOTATTACHED);
}
static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc)