forked from Minki/linux
usb: dwc3: debug: move dwc3_ep0_state_string() to debug.h
We will be using dwc3_ep0_state_string() from within our tracepoints, so we need to move that helper to debug.h in order for it to be accessible. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
8566cd1adf
commit
cdd72ac20b
@ -124,6 +124,22 @@ dwc3_gadget_link_string(enum dwc3_link_state link_state)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline const char *dwc3_ep0_state_string(enum dwc3_ep0_state state)
|
||||||
|
{
|
||||||
|
switch (state) {
|
||||||
|
case EP0_UNCONNECTED:
|
||||||
|
return "Unconnected";
|
||||||
|
case EP0_SETUP_PHASE:
|
||||||
|
return "Setup Phase";
|
||||||
|
case EP0_DATA_PHASE:
|
||||||
|
return "Data Phase";
|
||||||
|
case EP0_STATUS_PHASE:
|
||||||
|
return "Status Phase";
|
||||||
|
default:
|
||||||
|
return "UNKNOWN";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dwc3_gadget_event_string - returns event name
|
* dwc3_gadget_event_string - returns event name
|
||||||
* @event: the event code
|
* @event: the event code
|
||||||
|
@ -39,22 +39,6 @@ static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep);
|
|||||||
static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
|
static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
|
||||||
struct dwc3_ep *dep, struct dwc3_request *req);
|
struct dwc3_ep *dep, struct dwc3_request *req);
|
||||||
|
|
||||||
static const char *dwc3_ep0_state_string(enum dwc3_ep0_state state)
|
|
||||||
{
|
|
||||||
switch (state) {
|
|
||||||
case EP0_UNCONNECTED:
|
|
||||||
return "Unconnected";
|
|
||||||
case EP0_SETUP_PHASE:
|
|
||||||
return "Setup Phase";
|
|
||||||
case EP0_DATA_PHASE:
|
|
||||||
return "Data Phase";
|
|
||||||
case EP0_STATUS_PHASE:
|
|
||||||
return "Status Phase";
|
|
||||||
default:
|
|
||||||
return "UNKNOWN";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
|
static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
|
||||||
u32 len, u32 type, bool chain)
|
u32 len, u32 type, bool chain)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user