usb: composite: Don't override -EAGAIN return value
usb_gadget_func_wakeup() API calls USB DWC3 controller function
wakeup API. This API shall return different error value as below:
1. -EAGAIN if USB controller is into low power mode,
2. -EOPNOTSUPP if function wakeup is not supported,
3. -ETIMEDOUT or -EINVAL if USB dwc3 controller is failing to invoke
wakeup notification.
-EAGAIN return value is used by USB function driver to retry USB
function wakeup on receiving resume callback once USB bus is resumed.
Hence don't override -EAGAIN return value.
Also replace -ENOTSUPP with -EOPNOTSUPP which is error code used by
gagdet framework.
Change-Id: I5f392a7b31c169eacc3503191f6e03a72dd95238
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment