libusbhost: add usb_device_reset

bug: 26404209
Change-Id: I8f307d6683afe70fe334746f5be2856b79782493
This commit is contained in:
Keun-young Park 2016-01-12 18:22:36 -08:00
parent 34965eb118
commit f6411fa1ec
2 changed files with 8 additions and 0 deletions

View File

@ -219,6 +219,9 @@ int usb_device_bulk_transfer(struct usb_device *device,
int length,
unsigned int timeout);
/** Reset USB bus for the device */
int usb_device_reset(struct usb_device *device);
/* Creates a new usb_request. */
struct usb_request *usb_request_new(struct usb_device *dev,
const struct usb_endpoint_descriptor *ep_desc);

View File

@ -617,6 +617,11 @@ int usb_device_bulk_transfer(struct usb_device *device,
return ioctl(device->fd, USBDEVFS_BULK, &ctrl);
}
int usb_device_reset(struct usb_device *device)
{
return ioctl(device->fd, USBDEVFS_RESET);
}
struct usb_request *usb_request_new(struct usb_device *dev,
const struct usb_endpoint_descriptor *ep_desc)
{