X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fusb-sandbox.c;h=5e3d96c208ef151f45d72a88a7b493da50b6ada4;hb=ebba9d1daf7745483c8078bdae18875a84df5bc1;hp=c5f98220404432ae975cf43099cc40a78cbd6f68;hpb=1733259d25015c28c47990ec11af99b3f62f811c;p=u-boot diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c index c5f9822040..5e3d96c208 100644 --- a/drivers/usb/host/usb-sandbox.c +++ b/drivers/usb/host/usb-sandbox.c @@ -87,6 +87,24 @@ static int sandbox_submit_bulk(struct udevice *bus, struct usb_device *udev, return ret; } +static int sandbox_submit_int(struct udevice *bus, struct usb_device *udev, + unsigned long pipe, void *buffer, int length, + int interval) +{ + struct udevice *emul; + int ret; + + /* Just use child of dev as emulator? */ + debug("%s: bus=%s\n", __func__, bus->name); + ret = usb_emul_find(bus, pipe, &emul); + usbmon_trace(bus, pipe, NULL, emul); + if (ret) + return ret; + ret = usb_emul_int(emul, udev, pipe, buffer, length, interval); + + return ret; +} + static int sandbox_alloc_device(struct udevice *dev, struct usb_device *udev) { return 0; @@ -100,6 +118,7 @@ static int sandbox_usb_probe(struct udevice *dev) static const struct dm_usb_ops sandbox_usb_ops = { .control = sandbox_submit_control, .bulk = sandbox_submit_bulk, + .interrupt = sandbox_submit_int, .alloc_device = sandbox_alloc_device, };