aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Suchanek2019-08-18 10:55:27 +0200
committermarex2019-09-11 10:11:29 +0200
commit3437121c037f502a3b0faaec97059777034a1ead (patch)
tree37400fd4fb2ce3b28b7f82f0530dc4d7efad1307 /include
parent50dce8fbf0c8b6f55e32c8d2d08ccf6e58168027 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/usb.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/usb.h b/include/usb.h
index 0d38d8333a9..bcad552f85f 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -184,7 +184,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, struct devrequest *setup);
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, int interval);
+ int transfer_len, int interval, bool nonblock);
#if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST \
|| CONFIG_IS_ENABLED(DM_USB)
@@ -262,7 +262,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
void *data, int len, int *actual_length, int timeout);
int usb_int_msg(struct usb_device *dev, unsigned long pipe,
- void *buffer, int transfer_len, int interval);
+ void *buffer, int transfer_len, int interval, bool nonblock);
int usb_disable_asynch(int disable);
int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
int usb_get_configuration_no(struct usb_device *dev, int cfgno,
@@ -708,7 +708,7 @@ struct dm_usb_ops {
*/
int (*interrupt)(struct udevice *bus, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
- int interval);
+ int interval, bool nonblock);
/**
* create_int_queue() - Create and queue interrupt packets
@@ -1029,7 +1029,8 @@ int usb_emul_bulk(struct udevice *emul, struct usb_device *udev,
* @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);
+ unsigned long pipe, void *buffer, int length, int interval,
+ bool nonblock);
/**
* usb_emul_find() - Find an emulator for a particular device