/third_party/libusb/libusb/ |
D | core.c | 1248 libusb_device_handle **dev_handle) in libusb_wrap_sys_device() argument 1278 *dev_handle = _dev_handle; in libusb_wrap_sys_device() 1303 libusb_device_handle **dev_handle) in libusb_open() argument 1335 *dev_handle = _dev_handle; in libusb_open() 1363 struct libusb_device_handle *dev_handle = NULL; in libusb_open_device_with_vid_pid() local 1382 r = libusb_open(found, &dev_handle); in libusb_open_device_with_vid_pid() 1384 dev_handle = NULL; in libusb_open_device_with_vid_pid() 1389 return dev_handle; in libusb_open_device_with_vid_pid() 1393 struct libusb_device_handle *dev_handle) in do_close() argument 1406 if (transfer->dev_handle != dev_handle) in do_close() [all …]
|
D | sync.c | 46 struct libusb_context *ctx = HANDLE_CTX(transfer->dev_handle); in sync_transfer_wait_for_completion() 58 if (NULL == transfer->dev_handle) { in sync_transfer_wait_for_completion() 97 int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle, in libusb_control_transfer() argument 106 if (usbi_handling_events(HANDLE_CTX(dev_handle))) in libusb_control_transfer() 124 libusb_fill_control_transfer(transfer, dev_handle, buffer, in libusb_control_transfer() 160 usbi_warn(HANDLE_CTX(dev_handle), in libusb_control_transfer() 169 static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle, in do_sync_bulk_transfer() argument 177 if (usbi_handling_events(HANDLE_CTX(dev_handle))) in do_sync_bulk_transfer() 184 libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, in do_sync_bulk_transfer() 220 usbi_warn(HANDLE_CTX(dev_handle), in do_sync_bulk_transfer() [all …]
|
D | libusb.h | 1224 libusb_device_handle *dev_handle; member 1385 int LIBUSB_CALL libusb_get_bos_descriptor(libusb_device_handle *dev_handle, 1418 …L libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev, libusb_device_handle **dev_handle); 1419 int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **dev_handle); 1420 void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle); 1421 libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle); 1423 int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev_handle, 1425 int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev_handle, 1427 int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev_handle, 1433 int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, [all …]
|
D | libusbi.h | 305 #define TRANSFER_CTX(transfer) (HANDLE_CTX((transfer)->dev_handle)) 677 void usbi_handle_disconnect(struct libusb_device_handle *dev_handle); 754 static inline void *usbi_get_device_handle_priv(struct libusb_device_handle *dev_handle) in usbi_get_device_handle_priv() argument 756 return (unsigned char *)dev_handle + PTR_ALIGN(sizeof(*dev_handle)); in usbi_get_device_handle_priv() 916 struct libusb_device_handle *dev_handle, intptr_t sys_dev); 943 int (*open)(struct libusb_device_handle *dev_handle); 953 void (*close)(struct libusb_device_handle *dev_handle); 1032 int (*get_configuration)(struct libusb_device_handle *dev_handle, uint8_t *config); 1049 int (*set_configuration)(struct libusb_device_handle *dev_handle, int config); 1068 int (*claim_interface)(struct libusb_device_handle *dev_handle, uint8_t interface_number); [all …]
|
D | descriptor.c | 846 int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *dev_handle, in libusb_get_bos_descriptor() argument 856 r = libusb_get_descriptor(dev_handle, LIBUSB_DT_BOS, 0, _bos.buf, sizeof(_bos.buf)); in libusb_get_bos_descriptor() 859 usbi_err(HANDLE_CTX(dev_handle), "failed to read BOS (%d)", r); in libusb_get_bos_descriptor() 863 usbi_err(HANDLE_CTX(dev_handle), "short BOS read %d/%d", in libusb_get_bos_descriptor() 875 r = libusb_get_descriptor(dev_handle, LIBUSB_DT_BOS, 0, bos_data, bos_len); in libusb_get_bos_descriptor() 878 usbi_warn(HANDLE_CTX(dev_handle), "short BOS read %d/%u", in libusb_get_bos_descriptor() 880 r = parse_bos(HANDLE_CTX(dev_handle), bos, bos_data, r); in libusb_get_bos_descriptor() 882 usbi_err(HANDLE_CTX(dev_handle), "failed to read BOS (%d)", r); in libusb_get_bos_descriptor() 1085 int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, in libusb_get_string_descriptor_ascii() argument 1104 r = libusb_get_string_descriptor(dev_handle, 0, 0, str.buf, 4); in libusb_get_string_descriptor_ascii() [all …]
|
D | io.c | 1557 libusb_ref_device(transfer->dev_handle->dev); in libusb_submit_transfer() 1664 struct libusb_device_handle *dev_handle = transfer->dev_handle; in usbi_handle_transfer_completion() local 1697 libusb_unref_device(dev_handle->dev); in usbi_handle_transfer_completion() 1731 libusb_device_handle *dev_handle = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer)->dev_handle; in usbi_signal_transfer_completion() local 1733 if (dev_handle) { in usbi_signal_transfer_completion() 1734 struct libusb_context *ctx = HANDLE_CTX(dev_handle); in usbi_signal_transfer_completion() 2784 void usbi_handle_disconnect(struct libusb_device_handle *dev_handle) in usbi_handle_disconnect() argument 2786 struct libusb_context *ctx = HANDLE_CTX(dev_handle); in usbi_handle_disconnect() 2791 dev_handle->dev->bus_number, dev_handle->dev->device_address); in usbi_handle_disconnect() 2810 if (USBI_TRANSFER_TO_LIBUSB_TRANSFER(cur)->dev_handle == dev_handle) { in usbi_handle_disconnect()
|
/third_party/libusb/libusb/os/ |
D | haiku_usb_raw.cpp | 53 haiku_open(struct libusb_device_handle *dev_handle) in haiku_open() argument 55 USBDevice *dev = *((USBDevice **)usbi_get_device_priv(dev_handle->dev)); in haiku_open() 63 *((USBDeviceHandle **)usbi_get_device_handle_priv(dev_handle)) = handle; in haiku_open() 68 haiku_close(struct libusb_device_handle *dev_handle) in haiku_close() argument 70 USBDeviceHandle **pHandle = (USBDeviceHandle **)usbi_get_device_handle_priv(dev_handle); in haiku_close() 102 haiku_set_configuration(struct libusb_device_handle *dev_handle, int config) in haiku_set_configuration() argument 104 USBDeviceHandle *handle= *((USBDeviceHandle **)usbi_get_device_handle_priv(dev_handle)); in haiku_set_configuration() 111 haiku_claim_interface(struct libusb_device_handle *dev_handle, uint8_t interface_number) in haiku_claim_interface() argument 113 USBDeviceHandle *handle = *((USBDeviceHandle **)usbi_get_device_handle_priv(dev_handle)); in haiku_claim_interface() 118 haiku_set_altsetting(struct libusb_device_handle *dev_handle, uint8_t interface_number, uint8_t alt… in haiku_set_altsetting() argument [all …]
|
D | windows_common.c | 307 …dCompletionStatus(priv->completion_port, (DWORD)size, (ULONG_PTR)transfer->dev_handle, overlapped)) in windows_force_sync_completion() 422 struct libusb_device_handle *dev_handle; in windows_iocp_thread() local 447 dev_handle = (struct libusb_device_handle *)completion_key; in windows_iocp_thread() 448 handle_priv = usbi_get_device_handle_priv(dev_handle); in windows_iocp_thread() 450 usbi_mutex_lock(&dev_handle->lock); in windows_iocp_thread() 459 usbi_mutex_unlock(&dev_handle->lock); in windows_iocp_thread() 463 overlapped, dev_handle, dev_handle->dev->bus_number, dev_handle->dev->device_address); in windows_iocp_thread() 642 static int windows_open(struct libusb_device_handle *dev_handle) in windows_open() argument 644 struct windows_context_priv *priv = usbi_get_context_priv(HANDLE_CTX(dev_handle)); in windows_open() 645 struct windows_device_handle_priv *handle_priv = usbi_get_device_handle_priv(dev_handle); in windows_open() [all …]
|
D | windows_winusb.c | 53 static int winusbx_open(int sub_api, struct libusb_device_handle *dev_handle); 54 static void winusbx_close(int sub_api, struct libusb_device_handle *dev_handle); 55 static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, uint8_… 56 static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, uint8_t if… 57 static int winusbx_release_interface(int sub_api, struct libusb_device_handle *dev_handle, uint8_t … 59 static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, u… 62 static int winusbx_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char e… 64 static int winusbx_reset_device(int sub_api, struct libusb_device_handle *dev_handle); 69 static int hid_open(int sub_api, struct libusb_device_handle *dev_handle); 70 static void hid_close(int sub_api, struct libusb_device_handle *dev_handle); [all …]
|
D | darwin_usb.c | 78 static int darwin_claim_interface(struct libusb_device_handle *dev_handle, uint8_t iface); 79 static int darwin_release_interface(struct libusb_device_handle *dev_handle, uint8_t iface); 80 static int darwin_reset_device(struct libusb_device_handle *dev_handle); 178 static int ep_to_pipeRef(struct libusb_device_handle *dev_handle, uint8_t ep, uint8_t *pipep, uint8… in ep_to_pipeRef() argument 179 struct darwin_device_handle_priv *priv = usbi_get_device_handle_priv(dev_handle); in ep_to_pipeRef() 191 if (dev_handle->claimed_interfaces & (1U << iface)) { in ep_to_pipeRef() 210 usbi_warn (HANDLE_CTX(dev_handle), "no pipeRef found with endpoint address 0x%02x.", ep); in ep_to_pipeRef() 1198 static int darwin_open (struct libusb_device_handle *dev_handle) { in darwin_open() argument 1199 struct darwin_device_handle_priv *priv = usbi_get_device_handle_priv(dev_handle); in darwin_open() 1200 struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev); in darwin_open() [all …]
|
D | windows_common.h | 270 HANDLE dev_handle; // WinUSB needs an extra handle for the file member 304 int (*open)(struct libusb_device_handle *dev_handle); 305 void (*close)(struct libusb_device_handle *dev_handle); 312 int (*get_configuration)(struct libusb_device_handle *dev_handle, uint8_t *config); 313 int (*set_configuration)(struct libusb_device_handle *dev_handle, uint8_t config); 314 int (*claim_interface)(struct libusb_device_handle *dev_handle, uint8_t interface_number); 315 int (*release_interface)(struct libusb_device_handle *dev_handle, uint8_t interface_number); 316 int (*set_interface_altsetting)(struct libusb_device_handle *dev_handle, 318 int (*clear_halt)(struct libusb_device_handle *dev_handle, 320 int (*reset_device)(struct libusb_device_handle *dev_handle); [all …]
|
D | windows_usbdk.c | 401 static int usbdk_open(struct libusb_device_handle *dev_handle) in usbdk_open() argument 403 struct libusb_device *dev = dev_handle->dev; in usbdk_open() 417 …pletionPort(device_priv->system_handle, priv->completion_port, (ULONG_PTR)dev_handle, 0) == NULL) { in usbdk_open() 428 static void usbdk_close(struct libusb_device_handle *dev_handle) in usbdk_close() argument 430 struct usbdk_device_priv *priv = usbi_get_device_priv(dev_handle->dev); in usbdk_close() 433 usbi_err(HANDLE_CTX(dev_handle), "Redirector shutdown failed"); in usbdk_close() 439 static int usbdk_get_configuration(struct libusb_device_handle *dev_handle, uint8_t *config) in usbdk_get_configuration() argument 441 struct usbdk_device_priv *priv = usbi_get_device_priv(dev_handle->dev); in usbdk_get_configuration() 448 static int usbdk_set_configuration(struct libusb_device_handle *dev_handle, uint8_t config) in usbdk_set_configuration() argument 450 UNUSED(dev_handle); in usbdk_set_configuration() [all …]
|
D | sunos_usb.c | 224 sunos_kernel_driver_active(struct libusb_device_handle *dev_handle, uint8_t interface) in sunos_kernel_driver_active() argument 226 sunos_dev_priv_t *dpriv = usbi_get_device_priv(dev_handle->dev); in sunos_kernel_driver_active() 348 sunos_detach_kernel_driver(struct libusb_device_handle *dev_handle, in sunos_detach_kernel_driver() argument 351 struct libusb_context *ctx = HANDLE_CTX(dev_handle); in sunos_detach_kernel_driver() 359 dpriv = usbi_get_device_priv(dev_handle->dev); in sunos_detach_kernel_driver() 386 r |= sunos_usb_ioctl(dev_handle->dev, DEVCTL_AP_DISCONNECT); in sunos_detach_kernel_driver() 387 r |= sunos_usb_ioctl(dev_handle->dev, DEVCTL_AP_CONFIGURE); in sunos_detach_kernel_driver() 389 usbi_warn(HANDLE_CTX(dev_handle), "one or more ioctls failed"); in sunos_detach_kernel_driver() 392 dev_handle->dev->device_descriptor.idVendor, in sunos_detach_kernel_driver() 393 dev_handle->dev->device_descriptor.idProduct); in sunos_detach_kernel_driver() [all …]
|
D | windows_winusb.h | 99 int (*open)(int sub_api, struct libusb_device_handle *dev_handle); 100 void (*close)(int sub_api, struct libusb_device_handle *dev_handle); 101 int (*configure_endpoints)(int sub_api, struct libusb_device_handle *dev_handle, uint8_t iface); 102 int (*claim_interface)(int sub_api, struct libusb_device_handle *dev_handle, uint8_t iface); 103 …int (*set_interface_altsetting)(int sub_api, struct libusb_device_handle *dev_handle, uint8_t ifac… 104 int (*release_interface)(int sub_api, struct libusb_device_handle *dev_handle, uint8_t iface); 105 int (*clear_halt)(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint); 106 int (*reset_device)(int sub_api, struct libusb_device_handle *dev_handle);
|
D | openbsd_usb.c | 565 dpriv = usbi_get_device_priv(transfer->dev_handle->dev); in _sync_control_transfer() 574 req.ucr_addr = transfer->dev_handle->dev->device_address; in _sync_control_transfer() 594 if ((fd = _bus_open(transfer->dev_handle->dev->bus_number)) < 0) in _sync_control_transfer() 627 hpriv = usbi_get_device_handle_priv(transfer->dev_handle); in _access_endpoint() 628 dpriv = usbi_get_device_priv(transfer->dev_handle->dev); in _access_endpoint() 659 dpriv = usbi_get_device_priv(transfer->dev_handle->dev); in _sync_gen_transfer()
|
D | netbsd_usb.c | 516 dpriv = usbi_get_device_priv(transfer->dev_handle->dev); in _sync_control_transfer() 558 hpriv = usbi_get_device_handle_priv(transfer->dev_handle); in _access_endpoint() 559 dpriv = usbi_get_device_priv(transfer->dev_handle->dev); in _access_endpoint()
|
D | linux_usbfs.c | 1403 static void op_close(struct libusb_device_handle *dev_handle) in op_close() argument 1405 struct linux_device_handle_priv *hpriv = usbi_get_device_handle_priv(dev_handle); in op_close() 1409 usbi_remove_event_source(HANDLE_CTX(dev_handle), hpriv->fd); in op_close() 1836 usbi_get_device_handle_priv(transfer->dev_handle); in discard_urbs() 1886 usbi_get_device_handle_priv(transfer->dev_handle); in submit_bulk_transfer() 2058 usbi_get_device_handle_priv(transfer->dev_handle); in submit_iso_transfer() 2205 usbi_get_device_handle_priv(transfer->dev_handle); in submit_control_transfer()
|
/third_party/ltp/testcases/kernel/device-drivers/acpi/ |
D | ltp_acpi_cmds.c | 234 static acpi_handle dev_handle; variable 267 parent_handle, 0, &dev_handle) == 0) { in acpi_init() 268 parent_handle = dev_handle; in acpi_init() 271 status = acpi_get_object_info(dev_handle, &dev_info); in acpi_init() 280 status = acpi_get_parent(dev_handle, &parent_handle); in acpi_init() 300 status = acpi_install_notify_handler(dev_handle, in acpi_test_notify_handler() 305 status = acpi_remove_notify_handler(dev_handle, in acpi_test_notify_handler()
|
/third_party/mesa3d/src/virtio/vulkan/ |
D | vn_device.c | 307 VkDevice dev_handle = vn_device_to_handle(dev); in vn_CreateDevice() local 309 NULL, &dev_handle); in vn_CreateDevice() 315 vn_call_vkDestroyDevice(instance, dev_handle, NULL); in vn_CreateDevice() 328 vn_call_vkDestroyDevice(instance, dev_handle, NULL); in vn_CreateDevice() 333 *pDevice = dev_handle; in vn_CreateDevice()
|
D | vn_descriptor_set.c | 24 VkDevice dev_handle = vn_device_to_handle(dev); in vn_descriptor_set_layout_destroy() local 29 vn_async_vkDestroyDescriptorSetLayout(dev->instance, dev_handle, in vn_descriptor_set_layout_destroy() 71 VkDevice dev_handle = vn_device_to_handle(dev); in vn_descriptor_set_layout_init() local 130 vn_async_vkCreateDescriptorSetLayout(dev->instance, dev_handle, in vn_descriptor_set_layout_init()
|
D | vn_image.c | 75 VkDevice dev_handle = vn_device_to_handle(dev); in vn_image_init_memory_requirements() local 79 dev->instance, dev_handle, in vn_image_init_memory_requirements() 94 dev->instance, dev_handle, in vn_image_init_memory_requirements()
|
D | vn_device_memory.c | 283 VkDevice dev_handle = vn_device_to_handle(dev); in vn_device_memory_alloc() local 285 VkResult result = vn_call_vkAllocateMemory(dev->instance, dev_handle, in vn_device_memory_alloc() 294 vn_async_vkFreeMemory(dev->instance, dev_handle, mem_handle, NULL); in vn_device_memory_alloc()
|