summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:48:06 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:52 -0700
commitd8a26f0300e0fae51de277e5d5892926de12102f (patch)
tree0df35185229182cf796f38e393f409dc1609e6c2 /include
parentb70a3fea947b28c1368063048c494389d030233b (diff)
downloadblackbird-obmc-uboot-d8a26f0300e0fae51de277e5d5892926de12102f.tar.gz
blackbird-obmc-uboot-d8a26f0300e0fae51de277e5d5892926de12102f.zip
usb: sandbox: Add a USB emulation driver
Add a simple USB keyboard driver for sandbox. It provides a function to 'load' it with input data, which it will then stream through to the normal U-Boot input subsystem. When the input data is exhausted, the keyboard stops providing data. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/ch9.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 822fca0357..0ad4782a36 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -229,6 +229,8 @@ struct usb_ctrlrequest {
#define USB_DT_PIPE_USAGE 0x24
/* From the USB 3.0 spec */
#define USB_DT_SS_ENDPOINT_COMP 0x30
+/* From HID 1.11 spec */
+#define USB_DT_HID_REPORT 0x22
/* Conventional codes for class-specific descriptors. The convention is
* defined in the USB "Common Class" Spec (3.11). Individual class specs
@@ -385,6 +387,24 @@ struct usb_generic_descriptor {
__u8 bDescriptorType;
};
+struct __packed usb_class_hid_descriptor {
+ u8 bLength;
+ u8 bDescriptorType;
+ u16 bcdCDC;
+ u8 bCountryCode;
+ u8 bNumDescriptors; /* 0x01 */
+ u8 bDescriptorType0;
+ u16 wDescriptorLength0;
+ /* optional descriptors are not supported. */
+};
+
+struct __packed usb_class_report_descriptor {
+ u8 bLength; /* dummy */
+ u8 bDescriptorType;
+ u16 wLength;
+ u8 bData[0];
+};
+
/*
* Endpoints
*/
OpenPOWER on IntegriCloud