mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
USB: Add simple serial subclass support
This uses the newly allocated simple serial SubClass and Protocol identifiers to make enumeration of serial consoles over USB easier. The simple usb serial kernel driver can select based on vid/class/subclass/protocol, making it trivial to attach to serial consoles. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Enable USB console on discovery-stm32f072 and verify that a new ttyUSB? device is discovered. Change-Id: I6d3e414a20753573c2ee90a48fb1d5dce2c3972d Reviewed-on: https://chromium-review.googlesource.com/225869 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
ca74d14ea9
commit
4626fd37df
@@ -151,8 +151,8 @@ extern struct out_stream_ops const usb_stream_out_stream_ops;
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 2, \
|
||||
.bInterfaceClass = USB_CLASS_VENDOR_SPEC, \
|
||||
.bInterfaceSubClass = 0, \
|
||||
.bInterfaceProtocol = 0, \
|
||||
.bInterfaceSubClass = USB_SUBCLASS_GOOGLE_SERIAL, \
|
||||
.bInterfaceProtocol = USB_PROTOCOL_GOOGLE_SERIAL, \
|
||||
.iInterface = 0, \
|
||||
}; \
|
||||
const struct usb_endpoint_descriptor \
|
||||
|
||||
@@ -37,8 +37,8 @@ const struct usb_interface_descriptor USB_IFACE_DESC(USB_IFACE_CONSOLE) = {
|
||||
.bAlternateSetting = 0,
|
||||
.bNumEndpoints = 2,
|
||||
.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
|
||||
.bInterfaceSubClass = 0,
|
||||
.bInterfaceProtocol = 0,
|
||||
.bInterfaceSubClass = USB_SUBCLASS_GOOGLE_SERIAL,
|
||||
.bInterfaceProtocol = USB_PROTOCOL_GOOGLE_SERIAL,
|
||||
.iInterface = 0,
|
||||
};
|
||||
const struct usb_endpoint_descriptor USB_EP_DESC(USB_IFACE_CONSOLE, 0) = {
|
||||
|
||||
@@ -154,6 +154,10 @@ struct usb_endpoint_descriptor {
|
||||
/* USB Vendor ID assigned to Google Inc. */
|
||||
#define USB_VID_GOOGLE 0x18d1
|
||||
|
||||
/* Google specific SubClass/Protocol assignments */
|
||||
#define USB_SUBCLASS_GOOGLE_SERIAL 0x50
|
||||
#define USB_PROTOCOL_GOOGLE_SERIAL 0x01
|
||||
|
||||
/* Control requests */
|
||||
|
||||
/* bRequestType fields */
|
||||
|
||||
Reference in New Issue
Block a user