1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

usb: Add nonblock argument to submit_int_msg

This will be used to implement non-blocking keyboard polling in case of
errors.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
This commit is contained in:
Michal Suchanek
2019-08-18 10:55:27 +02:00
committed by marex
parent 50dce8fbf0
commit 3437121c03
14 changed files with 60 additions and 40 deletions

View File

@@ -341,7 +341,7 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev)
/* Submit a interrupt transfer request */
if (usb_int_msg(dev, data->intpipe, &data->new[0],
data->intpktsize, data->intinterval) >= 0)
data->intpktsize, data->intinterval, true) >= 0)
usb_kbd_irq_worker(dev);
#elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \
defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
@@ -505,7 +505,7 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum)
1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) {
#else
if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize,
data->intinterval) < 0) {
data->intinterval, false) < 0) {
#endif
printf("Failed to get keyboard state from device %04x:%04x\n",
dev->descriptor.idVendor, dev->descriptor.idProduct);