usb: dwc3: gadget: improve gcmd trace
Just like we did for endpoint commands, let's have a single trace output for the command and its status. This will improve trace readability Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
@@ -296,6 +296,20 @@ static inline const char *dwc3_ep_cmd_status_string(int status)
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *dwc3_gadget_generic_cmd_status_string(int status)
|
||||
{
|
||||
switch (status) {
|
||||
case -ETIMEDOUT:
|
||||
return "Timed Out";
|
||||
case 0:
|
||||
return "Successful";
|
||||
case 1:
|
||||
return "Error";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
Reference in New Issue
Block a user