From 3437121c037f502a3b0faaec97059777034a1ead Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Sun, 18 Aug 2019 10:55:27 +0200 Subject: 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 --- include/usb.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/usb.h') diff --git a/include/usb.h b/include/usb.h index 0d38d83..bcad552 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 -- cgit v1.1