summaryrefslogtreecommitdiff
path: root/chip/g/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/g/usb.c')
-rw-r--r--chip/g/usb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c
index 0fc4f62242..901a959e92 100644
--- a/chip/g/usb.c
+++ b/chip/g/usb.c
@@ -200,14 +200,6 @@ static void showregs(void)
#define CONFIG_USB_BCD_DEV 0x0100 /* 1.00 */
#endif
-#ifndef USB_BMATTRIBUTES
-#ifdef CONFIG_USB_SELF_POWERED
-#define USB_BMATTRIBUTES 0xc0 /* Self powered. */
-#else
-#define USB_BMATTRIBUTES 0x80 /* Bus powered. */
-#endif
-#endif
-
/* USB Standard Device Descriptor */
static const struct usb_device_descriptor dev_desc = {
.bLength = USB_DT_DEVICE_SIZE,
@@ -234,7 +226,14 @@ const struct usb_config_descriptor USB_CONF_DESC(conf) = {
.bNumInterfaces = USB_IFACE_COUNT,
.bConfigurationValue = 1, /* Caution: hard-coded value */
.iConfiguration = USB_STR_VERSION,
- .bmAttributes = USB_BMATTRIBUTES, /* bus or self powered */
+ .bmAttributes = 0x80 /* Reserved bit */
+#ifdef CONFIG_USB_SELF_POWERED /* bus or self powered */
+ | 0x40
+#endif
+#ifdef CONFIG_USB_REMOTE_WAKEUP
+ | 0x20
+#endif
+ ,
.bMaxPower = (CONFIG_USB_MAXPOWER_MA / 2),
};