summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:48:05 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:52 -0700
commitb70a3fea947b28c1368063048c494389d030233b (patch)
tree5bb6501eae2332832711044e1b858cc5265bfe0f /include
parent2cdb58ebdc3268a261cd3761b730ca4b98d37985 (diff)
downloadu-boot-imx-b70a3fea947b28c1368063048c494389d030233b.zip
u-boot-imx-b70a3fea947b28c1368063048c494389d030233b.tar.gz
u-boot-imx-b70a3fea947b28c1368063048c494389d030233b.tar.bz2
usb: sandbox: Add support for interrupt operations
Allow USB device emulation to support interrupt URBs so that we can use USB keyboards with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h
index d684531..55b9268 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -938,6 +938,17 @@ int usb_emul_bulk(struct udevice *emul, struct usb_device *udev,
unsigned long pipe, void *buffer, int length);
/**
+ * usb_emul_int() - Send an interrupt packet to an emulator
+ *
+ * @emul: Emulator device
+ * @udev: USB device (which the emulator is causing to appear)
+ * See struct dm_usb_ops for details on other parameters
+ * @return 0 if OK, -ve on error
+ */
+int usb_emul_int(struct udevice *emul, struct usb_device *udev,
+ unsigned long pipe, void *buffer, int length, int interval);
+
+/**
* usb_emul_find() - Find an emulator for a particular device
*
* Check @pipe to find a device number on bus @bus and return it.