summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-09-18 13:07:19 -0600
committerTom Rini <trini@konsulko.com>2024-09-18 13:07:19 -0600
commitc17805e19b9335e1fb5295c81b59eddf88d1b9ec (patch)
tree0e4cbc44f392b9f2e53d1e38e107ec630c0267c9 /include/usb.h
parent650883a568653f37ee4ff43beda56152b594a49c (diff)
parent017b441b2e3c879b20bcac496369f1213c4bdbcd (diff)
Merge patch series "Fix various bugs"
Simon Glass <sjg@chromium.org> says: This series includes the patches needed to make make the EFI 'boot' test work. That test has now been split off into a separate series along with the EFI patches. This series fixes these problems: - sandbox memory-mapping conflict with PCI - the fix for that causes the mbr test to crash as it sets up pointers instead of addresses for its 'mmc' commands - the mmc and read commands which cast addresses to pointers - a tricky bug to do with USB keyboard and stdio - a few other minor things
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/usb.h b/include/usb.h
index fcbe2146f7d..be37ed272e1 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -250,20 +250,12 @@ int usb_host_eth_scan(int mode);
#endif
-#ifdef CONFIG_USB_KEYBOARD
-
/*
* USB Keyboard reports are 8 bytes in boot protocol.
* Appendix B of HID Device Class Definition 1.11
*/
#define USB_KBD_BOOT_REPORT_SIZE 8
-int drv_usb_kbd_init(void);
-int usb_kbd_deregister(int force);
-
-#endif
-/* routines */
-
/*
* usb_init() - initialize the USB Controllers
*
@@ -1100,4 +1092,16 @@ struct usb_generic_descriptor **usb_emul_find_descriptor(
*/
void usb_show_tree(void);
+/**
+ * usb_kbd_remove_for_test() - Remove any USB keyboard
+ *
+ * This can only be called from test_pre_run(). It removes the USB keyboard from
+ * the console system so that the USB device can be dropped
+ */
+#if CONFIG_IS_ENABLED(USB_KEYBOARD)
+int usb_kbd_remove_for_test(void);
+#else
+static inline int usb_kbd_remove_for_test(void) { return 0; }
+#endif
+
#endif /*_USB_H_ */