aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/emul
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-08-18 10:55:27 +0200
committermarex <marex@chi.lan>2019-09-11 10:11:29 +0200
commit3437121c037f502a3b0faaec97059777034a1ead (patch)
tree37400fd4fb2ce3b28b7f82f0530dc4d7efad1307 /drivers/usb/emul
parent50dce8fbf0c8b6f55e32c8d2d08ccf6e58168027 (diff)
downloadu-boot-3437121c037f502a3b0faaec97059777034a1ead.zip
u-boot-3437121c037f502a3b0faaec97059777034a1ead.tar.gz
u-boot-3437121c037f502a3b0faaec97059777034a1ead.tar.bz2
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/emul')
-rw-r--r--drivers/usb/emul/sandbox_keyb.c3
-rw-r--r--drivers/usb/emul/usb-emul-uclass.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 6359451..dc43880 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -178,7 +178,8 @@ static int sandbox_keyb_control(struct udevice *dev, struct usb_device *udev,
}
static int sandbox_keyb_interrupt(struct udevice *dev, struct usb_device *udev,
- unsigned long pipe, void *buffer, int length, int interval)
+ unsigned long pipe, void *buffer, int length, int interval,
+ bool nonblock)
{
struct sandbox_keyb_priv *priv = dev_get_priv(dev);
uint8_t *data = buffer;
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index 9739815..50da6bd 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -245,7 +245,8 @@ int usb_emul_bulk(struct udevice *emul, struct usb_device *udev,
}
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)
{
struct dm_usb_ops *ops = usb_get_emul_ops(emul);
@@ -253,7 +254,8 @@ int usb_emul_int(struct udevice *emul, struct usb_device *udev,
return -ENOSYS;
debug("%s: dev=%s\n", __func__, emul->name);
- return ops->interrupt(emul, udev, pipe, buffer, length, interval);
+ return ops->interrupt(emul, udev, pipe, buffer, length, interval,
+ nonblock);
}
int usb_emul_setup_device(struct udevice *dev, struct usb_string *strings,