usb_hcd_pci_shutdown (9) Linux Manual Page
usb_hcd_pci_shutdown – shutdown host controller Synopsis void usb_hcd_pci_shutdown(struct pci_dev *dev); Arguments dev USB Host Controller being shutdown Copyright
usb_hcd_pci_shutdown – shutdown host controller Synopsis void usb_hcd_pci_shutdown(struct pci_dev *dev); Arguments dev USB Host Controller being shutdown Copyright
usb_hcd_pci_remove – shutdown processing for PCI-based HCDs Synopsis void usb_hcd_pci_remove(struct pci_dev *dev); Arguments dev USB Host Controller being removed Context !in_interrupt Description Reverses the effect of usb_hcd_pci_probe, first invoking the HCD’s stop method. It is always called from a thread context, normally “rmmod”, “apmd”, or something similar. Store this function in the HCD’s struct pci_driver…
usb_hcd_pci_probe – initialize PCI-based HCDs Synopsis int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id); Arguments dev USB Host Controller being probed id pci hotplug id connecting controller to HCD framework Context !in_interrupt Description Allocates basic PCI resources for this USB host controller, and then invokes the start method for the HCD associated with it through…
usb_hcd_link_urb_to_ep – add an URB to its endpoint queue Synopsis int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); Arguments hcd host controller to which urb was submitted urb URB being submitted Description Host controller drivers should call this routine in their enqueue method. The HCD’s private spinlock must be held and interrupts must be disabled. The…
usb_hcd_irq – hook IRQs to HCD framework (bus glue) Synopsis irqreturn_t usb_hcd_irq(int irq, void * __hcd); Arguments irq the IRQ being raised __hcd pointer to the HCD whose IRQ is being signaled Description If the controller isn’t HALTed, calls the driver’s irq handler. Checks whether the controller is now dead. Return IRQ_HANDLED if the IRQ was handled. IRQ_NONE…
usb_hcd_giveback_urb – return URB from HCD to device driver Synopsis void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status); Arguments hcd host controller returning the URB urb urb being returned to the USB device driver. status completion status code for the URB. Context in_interrupt Description This hands the URB from HCD to its USB device…
usb_hcd_check_unlink_urb – check whether an URB may be unlinked Synopsis int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, int status); Arguments hcd host controller to which urb was submitted urb URB being checked for unlinkability status error code to store in urb if the unlink succeeds Description Host controller drivers should call this routine in their…
usb_hc_died – report abnormal shutdown of a host controller (bus glue) Synopsis void usb_hc_died(struct usb_hcd *hcd); Arguments hcd pointer to the HCD representing the controller Description This is called by bus glue to report a USB host controller that died while operations may still have been pending. It’s called automatically by the PCI glue, so…
usb_gstrings_attach – attach gadget strings to a cdev and assign ids Synopsis struct usb_string *usb_gstrings_attach(struct usb_composite_dev *cdev, struct usb_gadget_strings **sp, unsigned n_strings); Arguments cdev the device whose string descriptor IDs are being allocated and attached. sp an array of usb_gadget_strings to attach. n_strings number of entries in each usb_strings array (sp[]->strings) Description This function will…
usb_get_urb – increments the reference count of the urb Synopsis struct urb *usb_get_urb(struct urb *urb); Arguments urb pointer to the urb to modify, may be NULL Description This must be called whenever a urb is transferred from a device driver to a host controller driver. This allows proper reference counting to happen for urbs. Return…
usb_get_status – issues a GET_STATUS call Synopsis int usb_get_status(struct usb_device *dev, int type, int target, void *data); Arguments dev the device whose status is being checked type USB_RECIP_*; for device, interface, or endpoint target zero (for device), else interface or endpoint number data pointer to two bytes of bitmap data Context !in_interrupt () Description Returns…
usb_get_maximum_speed – Get maximum requested speed for a given USB controller. Synopsis enum usb_device_speed usb_get_maximum_speed(struct device * dev); Arguments dev Pointer to the given USB controller device Description The function gets the maximum speed string from property “maximum-speed”, and returns the corresponding enum usb_device_speed. Copyright
usb_get_intf – increments the reference count of the usb interface structure Synopsis struct usb_interface *usb_get_intf(struct usb_interface *intf); Arguments intf the interface being referenced Description Each live reference to a interface must be refcounted. Drivers for USB interfaces should normally record such references in their probe methods, when they bind to an interface, and release them…
usb_get_from_anchor – get an anchor’s oldest urb Synopsis struct urb *usb_get_from_anchor(struct usb_anchor *anchor); Arguments anchor the anchor whose urb you want Description This will take the oldest urb from an anchor, unanchor and return it Return The oldest urb from anchor, or NULL if anchor has no urbs associated with it. Copyright
usb_get_dev – increments the reference count of the usb device structure Synopsis struct usb_device *usb_get_dev(struct usb_device *dev); Arguments dev the device being referenced Description Each live reference to a device should be refcounted. Drivers for USB interfaces should normally record such references in their probe methods, when they bind to an interface, and release them…
usb_get_descriptor – issues a generic GET_DESCRIPTOR request Synopsis int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size); Arguments dev the device whose descriptor is being retrieved type the descriptor type (USB_DT_*) index the number of the descriptor buf where to put the descriptor size how big is “buf”? Context !in_interrupt…
usb_get_current_frame_number – return current bus frame number Synopsis int usb_get_current_frame_number(struct usb_device *dev); Arguments dev the device whose bus is being queried Return The current frame number for the USB host controller used with the given USB device. This can be used when scheduling isochronous requests. Note Different kinds of host controller have different “scheduling horizons”….
usb_gadget_unregister_driver – unregister a gadget driver Synopsis int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); Arguments driver the driver being unregistered Context can sleep Description Call this in your gadget driver’s module cleanup function, to tell the underlying usb controller that your driver is going away. If the controller is connected to a USB host, it will first disconnect….
usb_gadget_probe_driver – probe a gadget driver Synopsis int usb_gadget_probe_driver(struct usb_gadget_driver *driver); Arguments driver the driver being registered Context can sleep Description Call this in your gadget driver’s module initialization function, to tell the underlying usb controller driver about your driver. The bind() function will be called to bind it to a gadget before this registration…
usb_gadget_get_string – fill out a string descriptor Synopsis int usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf); Arguments table of c strings encoded using UTF-8 id string id, from low byte of wValue in get string descriptor buf at least 256 bytes, must be 16-bit aligned Description Finds the UTF-8 string matching the ID, and converts…