summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorDanny Segal <dsegal@codeaurora.org>2014-05-27 12:22:38 +0300
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:34 -0700
commit635cdb12e488c2985676e9468ba05a418a59f1f1 (patch)
tree1835e94f96001935be60fe23f375915b1c05a5a9 /drivers/usb
parent8f171cb53fed821bdd304a1547692879e40a06c3 (diff)
gadget: dwc: Support remote wakeup bit in GET_STATUS command in HS-USB mode
In High-Speed mode, the remote wakeup feature is enabled by a SET_FEATURE command sent from the host. This patch adds the logic reflect this configuration in the device GET_STATUS command response. Change-Id: I0c934d0330d2580f15b1307005dde7b4b7874a7d Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/ep0.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 4e06e4f3c2da..639537caa6b6 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -382,6 +382,9 @@ static int dwc3_ep0_handle_status(struct dwc3 *dwc,
usb_status |= 1 << USB_DEV_STAT_U1_ENABLED;
if (reg & DWC3_DCTL_INITU2ENA)
usb_status |= 1 << USB_DEV_STAT_U2_ENABLED;
+ } else {
+ usb_status |= dwc->gadget.remote_wakeup <<
+ USB_DEVICE_REMOTE_WAKEUP;
}
break;
@@ -442,6 +445,9 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc,
switch (wValue) {
case USB_DEVICE_REMOTE_WAKEUP:
+ pr_debug("%s(): remote wakeup :%s\n", __func__,
+ (set ? "enabled" : "disabled"));
+ dwc->gadget.remote_wakeup = set;
break;
/*
* 9.4.1 says only only for SS, in AddressState only for