Home
last modified time | relevance | path

Searched refs:udev (Results 1 – 25 of 325) sorted by relevance

12345678910>>...13

/linux/drivers/leds/
H A Duleds.c42 struct uleds_device *udev = container_of(led_cdev, struct uleds_device, in uleds_brightness_set() local
45 if (udev->brightness != brightness) { in uleds_brightness_set()
46 udev->brightness = brightness; in uleds_brightness_set()
47 udev->new_data = true; in uleds_brightness_set()
48 wake_up_interruptible(&udev->waitq); in uleds_brightness_set()
54 struct uleds_device *udev; in uleds_open() local
56 udev = kzalloc_obj(*udev); in uleds_open()
57 if (!udev) in uleds_open()
60 udev->led_cdev.name = udev->user_dev.name; in uleds_open()
61 udev->led_cdev.brightness_set = uleds_brightness_set; in uleds_open()
[all …]
/linux/drivers/usb/core/
H A Dhub.c142 static int usb_reset_and_verify_device(struct usb_device *udev);
169 int usb_device_supports_lpm(struct usb_device *udev) in usb_device_supports_lpm() argument
172 if (udev->quirks & USB_QUIRK_NO_LPM) in usb_device_supports_lpm()
176 if (!udev->bos) in usb_device_supports_lpm()
182 if (udev->speed == USB_SPEED_HIGH || udev->speed == USB_SPEED_FULL) { in usb_device_supports_lpm()
183 if (udev->bos->ext_cap && in usb_device_supports_lpm()
185 le32_to_cpu(udev->bos->ext_cap->bmAttributes))) in usb_device_supports_lpm()
195 if (!udev->bos->ss_cap) { in usb_device_supports_lpm()
196 dev_info(&udev->dev, "No LPM exit latency info found, disabling LPM.\n"); in usb_device_supports_lpm()
200 if (udev->bos->ss_cap->bU1devExitLat == 0 && in usb_device_supports_lpm()
[all …]
H A Ddriver.c249 struct usb_device *udev = to_usb_device(dev); in usb_probe_device() local
260 error = usb_autoresume_device(udev); in usb_probe_device()
265 error = usb_generic_driver_probe(udev); in usb_probe_device()
291 error = udriver->probe(udev); in usb_probe_device()
296 udev->use_generic_driver = 1; in usb_probe_device()
305 struct usb_device *udev = to_usb_device(dev); in usb_unbind_device() local
309 udriver->disconnect(udev); in usb_unbind_device()
311 usb_generic_driver_disconnect(udev); in usb_unbind_device()
313 usb_autosuspend_device(udev); in usb_unbind_device()
322 struct usb_device *udev = interface_to_usbdev(intf); in usb_probe_interface() local
[all …]
H A Doffload.c26 int usb_offload_get(struct usb_device *udev) in usb_offload_get() argument
30 if (!usb_get_dev(udev)) in usb_offload_get()
33 if (pm_runtime_get_if_active(&udev->dev) != 1) { in usb_offload_get()
38 spin_lock(&udev->offload_lock); in usb_offload_get()
40 if (udev->offload_pm_locked) { in usb_offload_get()
45 udev->offload_usage++; in usb_offload_get()
48 spin_unlock(&udev->offload_lock); in usb_offload_get()
49 pm_runtime_put_autosuspend(&udev->dev); in usb_offload_get()
51 usb_put_dev(udev); in usb_offload_get()
67 int usb_offload_put(struct usb_device *udev) in usb_offload_put() argument
[all …]
H A Dsysfs.c29 struct usb_device *udev; \
33 udev = to_usb_device(dev); \
34 rc = usb_lock_device_interruptible(udev); \
37 actconfig = udev->actconfig; \
41 usb_unlock_device(udev); \
55 struct usb_device *udev; in bMaxPower_show() local
59 udev = to_usb_device(dev); in bMaxPower_show()
60 rc = usb_lock_device_interruptible(udev); in bMaxPower_show()
63 actconfig = udev->actconfig; in bMaxPower_show()
65 rc = sysfs_emit(buf, "%dmA\n", usb_get_max_power(udev, actconfig)); in bMaxPower_show()
[all …]
H A Dquirks.c655 bool usb_endpoint_is_ignored(struct usb_device *udev, in usb_endpoint_is_ignored() argument
663 if (!usb_match_device(udev, id)) in usb_endpoint_is_ignored()
666 if (!usb_match_one_id_intf(udev, intf, id)) in usb_endpoint_is_ignored()
677 static bool usb_match_any_interface(struct usb_device *udev, in usb_match_any_interface() argument
682 for (i = 0; i < udev->descriptor.bNumConfigurations; ++i) { in usb_match_any_interface()
683 struct usb_host_config *cfg = &udev->config[i]; in usb_match_any_interface()
695 if (usb_match_one_id_intf(udev, intf, id)) in usb_match_any_interface()
703 static int usb_amd_resume_quirk(struct usb_device *udev) in usb_amd_resume_quirk() argument
707 hcd = bus_to_hcd(udev->bus); in usb_amd_resume_quirk()
709 if (udev->level == 1 && hcd->amd_resume_bug == 1) in usb_amd_resume_quirk()
[all …]
H A Dtrace.h16 TP_PROTO(struct usb_device *udev),
17 TP_ARGS(udev),
19 __string(name, dev_name(&udev->dev))
27 __entry->speed = udev->speed;
28 __entry->state = udev->state;
29 __entry->bus_mA = udev->bus_mA;
30 __entry->authorized = udev->authorized;
41 TP_PROTO(struct usb_device *udev),
42 TP_ARGS(udev)
46 TP_PROTO(struct usb_device *udev),
[all …]
H A Dusb-acpi.c158 static int usb_acpi_add_usb4_devlink(struct usb_device *udev) in usb_acpi_add_usb4_devlink() argument
164 if (!udev->parent || udev->parent->parent) in usb_acpi_add_usb4_devlink()
167 hub = usb_hub_to_struct_hub(udev->parent); in usb_acpi_add_usb4_devlink()
170 port_dev = hub->ports[udev->portnum - 1]; in usb_acpi_add_usb4_devlink()
191 udev->usb4_link = link; in usb_acpi_add_usb4_devlink()
251 struct usb_device *udev; in usb_acpi_get_companion_for_port() local
257 udev = to_usb_device(port_dev->dev.parent->parent); in usb_acpi_get_companion_for_port()
264 if (!udev->parent) { in usb_acpi_get_companion_for_port()
265 adev = ACPI_COMPANION(&udev->dev); in usb_acpi_get_companion_for_port()
266 port1 = usb_hcd_find_raw_port_number(bus_to_hcd(udev->bus), in usb_acpi_get_companion_for_port()
[all …]
/linux/drivers/input/misc/
H A Duinput.c78 struct uinput_device *udev = input_get_drvdata(dev); in uinput_dev_event() local
85 udev->buff[udev->head] = (struct input_event) { in uinput_dev_event()
93 udev->head = (udev->head + 1) % UINPUT_BUFFER_SIZE; in uinput_dev_event()
95 wake_up_interruptible(&udev->waitq); in uinput_dev_event()
101 static bool uinput_request_alloc_id(struct uinput_device *udev, in uinput_request_alloc_id() argument
107 spin_lock(&udev->requests_lock); in uinput_request_alloc_id()
110 if (!udev->requests[id]) { in uinput_request_alloc_id()
112 udev->requests[id] = request; in uinput_request_alloc_id()
118 spin_unlock(&udev->requests_lock); in uinput_request_alloc_id()
122 static struct uinput_request *uinput_request_find(struct uinput_device *udev, in uinput_request_find() argument
[all …]
/linux/drivers/uio/
H A Duio_pci_generic_sva.c29 struct uio_pci_sva_dev *udev = info->priv; in uio_pci_sva_open() local
32 if (!udev || !udev->pdev) in uio_pci_sva_open()
35 domain = iommu_get_domain_for_dev(&udev->pdev->dev); in uio_pci_sva_open()
37 iommu_detach_device(domain, &udev->pdev->dev); in uio_pci_sva_open()
39 handle = iommu_sva_bind_device(&udev->pdev->dev, current->mm); in uio_pci_sva_open()
43 udev->pasid = iommu_sva_get_pasid(handle); in uio_pci_sva_open()
45 udev->sva_handle = handle; in uio_pci_sva_open()
52 struct uio_pci_sva_dev *udev = info->priv; in uio_pci_sva_release() local
54 if (!udev || !udev->pdev) in uio_pci_sva_release()
57 iommu_sva_unbind_device(udev->sva_handle); in uio_pci_sva_release()
[all …]
/linux/drivers/usb/storage/
H A Duas-detect.h60 struct usb_device *udev = interface_to_usbdev(intf); in uas_use_uas_driver() local
61 struct usb_hcd *hcd = bus_to_hcd(udev->bus); in uas_use_uas_driver()
98 if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c && in uas_use_uas_driver()
99 (le16_to_cpu(udev->descriptor.idProduct) == 0x5106 || in uas_use_uas_driver()
100 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) { in uas_use_uas_driver()
101 if (udev->actconfig->desc.bMaxPower == 0) { in uas_use_uas_driver()
103 } else if (udev->speed < USB_SPEED_SUPER) { in uas_use_uas_driver()
116 if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2) in uas_use_uas_driver()
126 if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bda && in uas_use_uas_driver()
127 le16_to_cpu(udev->descriptor.idProduct) == 0x9210 && in uas_use_uas_driver()
[all …]
H A Donetouch.c40 struct usb_device *udev; /* usb device */ member
115 "retval %d\n", onetouch->udev->bus->bus_name, in usb_onetouch_irq()
116 onetouch->udev->devpath, retval); in usb_onetouch_irq()
124 onetouch->irq->dev = onetouch->udev; in usb_onetouch_open()
165 struct usb_device *udev = ss->pusb_dev; in onetouch_connect_input() local
182 pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); in onetouch_connect_input()
183 maxp = usb_maxpacket(udev, pipe); in onetouch_connect_input()
191 onetouch->data = usb_alloc_coherent(udev, ONETOUCH_PKT_LEN, in onetouch_connect_input()
200 onetouch->udev = udev; in onetouch_connect_input()
203 if (udev->manufacturer) in onetouch_connect_input()
[all …]
H A Dsierra_ms.c48 static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode) in sierra_set_ms_mode() argument
51 dev_dbg(&udev->dev, "SWIMS: %s", "DEVICE MODE SWITCH\n"); in sierra_set_ms_mode()
52 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in sierra_set_ms_mode()
64 static int sierra_get_swoc_info(struct usb_device *udev, in sierra_get_swoc_info() argument
69 dev_dbg(&udev->dev, "SWIMS: Attempting to get TRU-Install info\n"); in sierra_get_swoc_info()
71 result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in sierra_get_swoc_info()
98 struct usb_device *udev = interface_to_usbdev(intf); in truinst_show() local
108 result = sierra_get_swoc_info(udev, swocInfo); in truinst_show()
131 struct usb_device *udev; in sierra_ms_init() local
133 udev = us->pusb_dev; in sierra_ms_init()
[all …]
/linux/tools/usb/usbip/libsrc/
H A Dusbip_common.c17 extern struct udev *udev_context;
94 dbg("%-20s = %x", to_string(name), (int) udev->name)
110 void dump_usb_device(struct usbip_usb_device *udev) in dump_usb_device() argument
114 dbg("%-20s = %s", "path", udev->path); in dump_usb_device()
115 dbg("%-20s = %s", "busid", udev->busid); in dump_usb_device()
118 udev->bDeviceClass, in dump_usb_device()
119 udev->bDeviceSubClass, in dump_usb_device()
120 udev->bDeviceProtocol); in dump_usb_device()
126 udev->idVendor, in dump_usb_device()
127 udev->idProduct); in dump_usb_device()
[all …]
/linux/tools/usb/usbip/src/
H A Dusbip_list.c50 struct usbip_usb_device udev; in get_exported_devices() local
88 memset(&udev, 0, sizeof(udev)); in get_exported_devices()
89 rc = usbip_net_recv(sockfd, &udev, sizeof(udev)); in get_exported_devices()
94 usbip_net_pack_usb_device(0, &udev); in get_exported_devices()
97 udev.idVendor, udev.idProduct); in get_exported_devices()
99 udev.bDeviceClass, udev.bDeviceSubClass, in get_exported_devices()
100 udev.bDeviceProtocol); in get_exported_devices()
101 printf("%11s: %s\n", udev.busid, product_name); in get_exported_devices()
102 printf("%11s: %s\n", "", udev.path); in get_exported_devices()
105 for (j = 0; j < udev.bNumInterfaces; j++) { in get_exported_devices()
[all …]
/linux/drivers/net/wireless/purelifi/plfxlc/
H A Dfirmware.c12 static int send_vendor_request(struct usb_device *udev, int request, in send_vendor_request() argument
15 return usb_control_msg(udev, in send_vendor_request()
16 usb_rcvctrlpipe(udev, 0), in send_vendor_request()
21 static int send_vendor_command(struct usb_device *udev, int request, in send_vendor_command() argument
24 return usb_control_msg(udev, in send_vendor_command()
25 usb_sndctrlpipe(udev, 0), in send_vendor_command()
32 struct usb_device *udev = interface_to_usbdev(intf); in plfxlc_download_fpga() local
41 if ((le16_to_cpu(udev->descriptor.idVendor) == in plfxlc_download_fpga()
43 (le16_to_cpu(udev->descriptor.idProduct) == in plfxlc_download_fpga()
48 } else if ((le16_to_cpu(udev->descriptor.idVendor)) == in plfxlc_download_fpga()
[all …]
/linux/drivers/usb/serial/
H A Dipw.c134 struct usb_device *udev = port->serial->dev; in ipw_open() local
148 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ipw_open()
160 usb_clear_halt(udev, usb_rcvbulkpipe(udev, port->bulk_in_endpointAddress)); in ipw_open()
161 usb_clear_halt(udev, usb_sndbulkpipe(udev, port->bulk_out_endpointAddress)); in ipw_open()
169 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ipw_open()
182 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ipw_open()
220 struct usb_device *udev = port->serial->dev; in ipw_dtr_rts() local
226 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ipw_dtr_rts()
237 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ipw_dtr_rts()
251 struct usb_device *udev = port->serial->dev; in ipw_close() local
[all …]
/linux/drivers/bluetooth/
H A Dath3k.c202 static int ath3k_load_firmware(struct usb_device *udev, in ath3k_load_firmware() argument
210 BT_DBG("udev %p", udev); in ath3k_load_firmware()
218 err = usb_control_msg_send(udev, 0, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR, in ath3k_load_firmware()
228 pipe = usb_sndbulkpipe(udev, 0x02); in ath3k_load_firmware()
237 err = usb_bulk_msg(udev, pipe, send_buf, size, in ath3k_load_firmware()
254 static int ath3k_get_state(struct usb_device *udev, unsigned char *state) in ath3k_get_state() argument
256 return usb_control_msg_recv(udev, 0, ATH3K_GETSTATE, in ath3k_get_state()
262 static int ath3k_get_version(struct usb_device *udev, in ath3k_get_version() argument
265 return usb_control_msg_recv(udev, 0, ATH3K_GETVERSION, in ath3k_get_version()
271 static int ath3k_load_fwfile(struct usb_device *udev, in ath3k_load_fwfile() argument
[all …]
H A Dbcm203x.c48 struct usb_device *udev; member
66 struct usb_device *udev = urb->dev; in bcm203x_complete() local
69 BT_DBG("udev %p urb %p", udev, urb); in bcm203x_complete()
81 usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, BCM203X_OUT_EP), in bcm203x_complete()
91 usb_fill_int_urb(urb, udev, usb_rcvintpipe(udev, BCM203X_IN_EP), in bcm203x_complete()
111 usb_fill_int_urb(urb, udev, usb_rcvintpipe(udev, BCM203X_IN_EP), in bcm203x_complete()
118 usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, BCM203X_OUT_EP), in bcm203x_complete()
155 struct usb_device *udev = interface_to_usbdev(intf); in bcm203x_probe() local
168 data->udev = udev; in bcm203x_probe()
175 if (request_firmware(&firmware, "BCM2033-MD.hex", &udev->dev) < 0) { in bcm203x_probe()
[all …]
/linux/drivers/net/wireless/marvell/libertas/
H A Dif_usb.c197 struct usb_device *udev; in if_usb_probe() local
203 udev = interface_to_usbdev(intf); in if_usb_probe()
212 cardp->udev = udev; in if_usb_probe()
216 lbs_deb_usbd(&udev->dev, "bcdUSB = 0x%X bDeviceClass = 0x%X" in if_usb_probe()
218 le16_to_cpu(udev->descriptor.bcdUSB), in if_usb_probe()
219 udev->descriptor.bDeviceClass, in if_usb_probe()
220 udev->descriptor.bDeviceSubClass, in if_usb_probe()
221 udev->descriptor.bDeviceProtocol); in if_usb_probe()
227 lbs_deb_usbd(&udev->dev, "Endpoints not found\n"); in if_usb_probe()
234 lbs_deb_usbd(&udev->dev, "in_endpoint = %d\n", cardp->ep_in); in if_usb_probe()
[all …]
/linux/drivers/media/usb/stk1160/
H A Dstk1160-core.c58 int pipe = usb_rcvctrlpipe(dev->udev, 0); in stk1160_read_reg()
66 ret = usb_control_msg(dev->udev, pipe, 0x00, in stk1160_read_reg()
84 int pipe = usb_sndctrlpipe(dev->udev, 0); in stk1160_write_reg()
86 ret = usb_control_msg(dev->udev, pipe, 0x01, in stk1160_write_reg()
174 static int stk1160_scan_usb(struct usb_interface *intf, struct usb_device *udev, in stk1160_scan_usb() argument
195 if (udev->speed == USB_SPEED_HIGH) in stk1160_scan_usb()
214 dev_err(&udev->dev, "no audio or video endpoints found\n"); in stk1160_scan_usb()
218 switch (udev->speed) { in stk1160_scan_usb()
232 dev_info(&udev->dev, "New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n", in stk1160_scan_usb()
233 udev->manufacturer ? udev->manufacturer : "", in stk1160_scan_usb()
[all …]
/linux/drivers/usb/host/
H A Dxhci.c1502 static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev, in xhci_check_args() argument
1508 if (!hcd || (check_ep && !ep) || !udev) { in xhci_check_args()
1512 if (!udev->parent) { in xhci_check_args()
1519 if (!udev->slot_id || !xhci->devs[udev->slot_id]) { in xhci_check_args()
1525 virt_dev = xhci->devs[udev->slot_id]; in xhci_check_args()
1526 if (virt_dev->udev != udev) { in xhci_check_args()
1540 struct usb_device *udev, struct xhci_command *command,
1560 max_packet_size = usb_endpoint_maxp(&vdev->udev->ep0.desc); in xhci_check_ep0_maxpacket()
1601 ret = xhci_configure_endpoint(xhci, vdev->udev, command, in xhci_check_ep0_maxpacket()
1607 dev_dbg(&vdev->udev->dev, "incorrect max packet size %d for ep0\n", in xhci_check_ep0_maxpacket()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/engine/device/
H A Duser.c73 nvkm_udevice_info(struct nvkm_udevice *udev, void *data, u32 size) in nvkm_udevice_info() argument
75 struct nvkm_object *object = &udev->object; in nvkm_udevice_info()
76 struct nvkm_device *device = udev->device; in nvkm_udevice_info()
174 nvkm_udevice_time(struct nvkm_udevice *udev, void *data, u32 size) in nvkm_udevice_time() argument
176 struct nvkm_object *object = &udev->object; in nvkm_udevice_time()
177 struct nvkm_device *device = udev->device; in nvkm_udevice_time()
195 struct nvkm_udevice *udev = nvkm_udevice(object); in nvkm_udevice_mthd() local
199 return nvkm_udevice_info(udev, data, size); in nvkm_udevice_mthd()
201 return nvkm_udevice_time(udev, data, size); in nvkm_udevice_mthd()
212 struct nvkm_udevice *udev = nvkm_udevice(object); in nvkm_udevice_map() local
[all …]
/linux/drivers/hid/bpf/progs/
H A DREADME9 They should be loaded in the kernel by `udev-hid-bpf`:
11 https://gitlab.freedesktop.org/libevdev/udev-hid-bpf
17 Once a .bpf.c file is accepted here, it is duplicated in `udev-hid-bpf`
20 land in distributions when they update `udev-hid-bpf`
30 Just run `sudo udev-hid-bpf install ./my-awesome-fix.bpf.o`
34 - copy the `.bpf.o` you want in `/etc/udev-hid-bpf/`
35 - create a new udev rule to automatically load it
37 The following should do the trick (assuming udev-hid-bpf is available in
41 $> cp xppen-ArtistPro16Gen2.bpf.o /etc/udev-hid-bpf/
42 $> udev-hid-bpf inspect xppen-ArtistPro16Gen2.bpf.o
[all …]
/linux/drivers/usb/misc/
H A Dadutux.c72 struct usb_device *udev; /* save off the usb device pointer */ member
152 usb_put_dev(dev->udev); in adu_delete()
162 adu_debug_data(&dev->udev->dev, __func__, in adu_interrupt_in_callback()
170 dev_dbg(&dev->udev->dev, in adu_interrupt_in_callback()
186 dev_dbg(&dev->udev->dev, "%s reading %d\n", __func__, in adu_interrupt_in_callback()
189 dev_dbg(&dev->udev->dev, "%s : read_buffer overflow\n", in adu_interrupt_in_callback()
207 adu_debug_data(&dev->udev->dev, __func__, in adu_interrupt_out_callback()
214 dev_dbg(&dev->udev->dev, in adu_interrupt_out_callback()
261 dev_dbg(&dev->udev->dev, "%s: open count %d\n", __func__, in adu_open()
271 usb_fill_int_urb(dev->interrupt_in_urb, dev->udev, in adu_open()
[all …]

12345678910>>...13