Commit 2fdc5993 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB OTG: gadget zero (4/5)

Minor gadget zero fixes:

 - correct string descriptions:  they're always UTF-8
 - for OTG, report HNP and remote wakeup support
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 1ae4eefe
......@@ -399,7 +399,7 @@ static const struct usb_descriptor_header *hs_loopback_function [] = {
static char manufacturer [40];
static char serial [40];
/* static strings, in iso 8859/1 */
/* static strings, in UTF-8 */
static struct usb_string strings [] = {
{ STRING_MANUFACTURER, manufacturer, },
{ STRING_PRODUCT, longname, },
......@@ -960,7 +960,8 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
case USB_DT_STRING:
/* wIndex == language code.
* this driver only handles one language, you can
* add others even if they don't use iso8859/1
* add string tables for other languages, using
* any UTF-8 characters
*/
value = usb_gadget_get_string (&stringtab,
ctrl->wValue & 0xff, req->buf);
......@@ -1238,6 +1239,12 @@ zero_bind (struct usb_gadget *gadget)
loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
}
if (gadget->is_otg) {
otg_descriptor.bmAttributes |= USB_OTG_HNP,
source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
}
usb_gadget_set_selfpowered (gadget);
init_timer (&dev->resume);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment