Lines Matching refs:udev

29 static int ch9_req_cb(struct usb_device *const udev, struct uhc_transfer *const xfer)  in ch9_req_cb()  argument
37 int usbh_req_setup(struct usb_device *const udev, in usbh_req_setup() argument
56 xfer = usbh_xfer_alloc(udev, ep, 0, 64, SETUP_REQ_TIMEOUT, (void *)ch9_req_cb); in usbh_req_setup()
66 ret = usbh_xfer_buf_add(udev, xfer, buf); in usbh_req_setup()
72 ret = usbh_xfer_enqueue(udev, xfer); in usbh_req_setup()
81 usbh_xfer_free(udev, xfer); in usbh_req_setup()
86 int usbh_req_desc(struct usb_device *const udev, in usbh_req_desc() argument
96 return usbh_req_setup(udev, in usbh_req_desc()
101 int usbh_req_desc_dev(struct usb_device *const udev, in usbh_req_desc_dev() argument
109 buf = usbh_xfer_buf_alloc(udev, wLength); in usbh_req_desc_dev()
114 ret = usbh_req_desc(udev, type, 0, 0, wLength, buf); in usbh_req_desc_dev()
123 usbh_xfer_buf_free(udev, buf); in usbh_req_desc_dev()
128 int usbh_req_desc_cfg(struct usb_device *const udev, in usbh_req_desc_cfg() argument
138 buf = usbh_xfer_buf_alloc(udev, len); in usbh_req_desc_cfg()
143 ret = usbh_req_desc(udev, type, index, 0, wLength, buf); in usbh_req_desc_cfg()
149 usbh_xfer_buf_free(udev, buf); in usbh_req_desc_cfg()
154 int usbh_req_set_address(struct usb_device *const udev, in usbh_req_set_address() argument
161 ret = usbh_req_setup(udev, bmRequestType, bRequest, addr, 0, 0, NULL); in usbh_req_set_address()
163 udev->addr = addr; in usbh_req_set_address()
165 udev->state = USB_STATE_DEFAULT; in usbh_req_set_address()
168 if (addr != 0 && udev->state == USB_STATE_DEFAULT) { in usbh_req_set_address()
169 udev->state = USB_STATE_ADDRESSED; in usbh_req_set_address()
176 int usbh_req_set_cfg(struct usb_device *const udev, in usbh_req_set_cfg() argument
184 ret = usbh_req_setup(udev, bmRequestType, bRequest, cfg, 0, 0, NULL); in usbh_req_set_cfg()
186 udev->actual_cfg = cfg; in usbh_req_set_cfg()
188 udev->state = USB_STATE_ADDRESSED; in usbh_req_set_cfg()
191 if (cfg != 0 && udev->state == USB_STATE_ADDRESSED) { in usbh_req_set_cfg()
192 udev->state = USB_STATE_CONFIGURED; in usbh_req_set_cfg()
199 int usbh_req_get_cfg(struct usb_device *const udev, in usbh_req_get_cfg() argument
208 buf = usbh_xfer_buf_alloc(udev, wLength); in usbh_req_get_cfg()
213 ret = usbh_req_setup(udev, bmRequestType, bRequest, 0, 0, wLength, buf); in usbh_req_get_cfg()
218 usbh_xfer_buf_free(udev, buf); in usbh_req_get_cfg()
223 int usbh_req_set_alt(struct usb_device *const udev, in usbh_req_set_alt() argument
232 return usbh_req_setup(udev, in usbh_req_set_alt()
237 int usbh_req_set_sfs_rwup(struct usb_device *const udev) in usbh_req_set_sfs_rwup() argument
243 return usbh_req_setup(udev, in usbh_req_set_sfs_rwup()
248 int usbh_req_clear_sfs_rwup(struct usb_device *const udev) in usbh_req_clear_sfs_rwup() argument
254 return usbh_req_setup(udev, in usbh_req_clear_sfs_rwup()
259 int usbh_req_set_hcfs_ppwr(struct usb_device *const udev, in usbh_req_set_hcfs_ppwr() argument
269 return usbh_req_setup(udev, in usbh_req_set_hcfs_ppwr()
274 int usbh_req_set_hcfs_prst(struct usb_device *const udev, in usbh_req_set_hcfs_prst() argument
284 return usbh_req_setup(udev, in usbh_req_set_hcfs_prst()