diff options
author | Michal Suchanek <msuchanek@suse.de> | 2019-08-18 10:55:27 +0200 |
---|---|---|
committer | marex <marex@chi.lan> | 2019-09-11 10:11:29 +0200 |
commit | 3437121c037f502a3b0faaec97059777034a1ead (patch) | |
tree | 37400fd4fb2ce3b28b7f82f0530dc4d7efad1307 /drivers/usb/host/dwc2.c | |
parent | 50dce8fbf0c8b6f55e32c8d2d08ccf6e58168027 (diff) | |
download | u-boot-3437121c037f502a3b0faaec97059777034a1ead.tar.gz u-boot-3437121c037f502a3b0faaec97059777034a1ead.tar.bz2 u-boot-3437121c037f502a3b0faaec97059777034a1ead.zip |
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 'drivers/usb/host/dwc2.c')
-rw-r--r-- | drivers/usb/host/dwc2.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index a62a2f8a95..bc6166283c 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1108,7 +1108,8 @@ static int _submit_control_msg(struct dwc2_priv *priv, struct usb_device *dev, } int _submit_int_msg(struct dwc2_priv *priv, struct usb_device *dev, - unsigned long pipe, void *buffer, int len, int interval) + unsigned long pipe, void *buffer, int len, int interval, + bool nonblock) { unsigned long timeout; int ret; @@ -1236,9 +1237,10 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer, } int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, - int len, int interval) + int len, int interval, bool nonblock) { - return _submit_int_msg(&local, dev, pipe, buffer, len, interval); + return _submit_int_msg(&local, dev, pipe, buffer, len, interval, + nonblock); } /* U-Boot USB control interface */ @@ -1292,13 +1294,14 @@ static int dwc2_submit_bulk_msg(struct udevice *dev, struct usb_device *udev, static int dwc2_submit_int_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, - int interval) + int interval, bool nonblock) { struct dwc2_priv *priv = dev_get_priv(dev); debug("%s: dev='%s', udev=%p\n", __func__, dev->name, udev); - return _submit_int_msg(priv, udev, pipe, buffer, length, interval); + return _submit_int_msg(priv, udev, pipe, buffer, length, interval, + nonblock); } static int dwc2_usb_ofdata_to_platdata(struct udevice *dev) |