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>
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index ed218fa..16a1ddb 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -366,6 +366,9 @@
 				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;
@@ -422,6 +425,9 @@
 
 		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