mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
usb: dwc3: gadget: print device events
This patch prints the reset/disconnect/suspend/wakeup event for USB developer to check if the USB is reset/disconnted/ suspended/waked from USB PHY. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: I889867edc6fd4b4d2fb2927c80d55a850556a8ad
This commit is contained in:
@@ -3420,15 +3420,18 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
|
||||
{
|
||||
switch (event->type) {
|
||||
case DWC3_DEVICE_EVENT_DISCONNECT:
|
||||
dev_info(dwc->dev, "device disconnect\n");
|
||||
dwc3_gadget_disconnect_interrupt(dwc);
|
||||
break;
|
||||
case DWC3_DEVICE_EVENT_RESET:
|
||||
dev_info(dwc->dev, "device reset\n");
|
||||
dwc3_gadget_reset_interrupt(dwc);
|
||||
break;
|
||||
case DWC3_DEVICE_EVENT_CONNECT_DONE:
|
||||
dwc3_gadget_conndone_interrupt(dwc);
|
||||
break;
|
||||
case DWC3_DEVICE_EVENT_WAKEUP:
|
||||
dev_info(dwc->dev, "device wakeup\n");
|
||||
dwc3_gadget_wakeup_interrupt(dwc);
|
||||
break;
|
||||
case DWC3_DEVICE_EVENT_HIBER_REQ:
|
||||
@@ -3448,6 +3451,7 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
|
||||
* Ignore suspend event until the gadget enters into
|
||||
* USB_STATE_CONFIGURED state.
|
||||
*/
|
||||
dev_info(dwc->dev, "device suspend\n");
|
||||
if (dwc->gadget.state >= USB_STATE_CONFIGURED)
|
||||
dwc3_gadget_suspend_interrupt(dwc,
|
||||
event->event_info);
|
||||
|
||||
Reference in New Issue
Block a user