]> git.sur5r.net Git - u-boot/blobdiff - include/usb.h
usb: emul: Expose find_descriptor() as a public API
[u-boot] / include / usb.h
index 63eddddc914fb35717278fc546be8e683d02755f..37665146359af52e52083a872ba71f17f6741be7 100644 (file)
@@ -1055,6 +1055,17 @@ int usb_emul_find(struct udevice *bus, ulong pipe, int port1,
  */
 int usb_emul_find_for_dev(struct udevice *dev, struct udevice **emulp);
 
+/**
+ * usb_emul_find_descriptor() - Find a USB descriptor of a particular device
+ *
+ * @ptr:       a pointer to a list of USB descriptor pointers
+ * @type:      type of USB descriptor to find
+ * @index:     if @type is USB_DT_CONFIG, this is the configuration value
+ * @return a pointer to the USB descriptor found, NULL if not found
+ */
+struct usb_generic_descriptor **usb_emul_find_descriptor(
+               struct usb_generic_descriptor **ptr, int type, int index);
+
 /**
  * usb_emul_reset() - Reset all emulators ready for use
  *