Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/usb.h>
#include <linux/usb/quirks.h>
#include <linux/usb/hcd.h>
#include "usb.h"
Go to the source code of this file.
Variables | |
struct bus_type | usb_bus_type |
EXPORT_SYMBOL_GPL | ( | usb_driver_claim_interface | ) |
EXPORT_SYMBOL_GPL | ( | usb_driver_release_interface | ) |
EXPORT_SYMBOL_GPL | ( | usb_match_one_id | ) |
EXPORT_SYMBOL_GPL | ( | usb_match_id | ) |
EXPORT_SYMBOL_GPL | ( | usb_register_device_driver | ) |
EXPORT_SYMBOL_GPL | ( | usb_deregister_device_driver | ) |
EXPORT_SYMBOL_GPL | ( | usb_register_driver | ) |
EXPORT_SYMBOL_GPL | ( | usb_deregister | ) |
usb_deregister - unregister a USB interface driver : USB operations of the interface driver to unregister Context: must be able to sleep
Unlinks the specified driver from the internal USB driver list.
NOTE: If you called usb_register_dev(), you still need to call usb_deregister_dev() to clean up your driver's allocated minor numbers, this * call will no longer do it for you.
int usb_driver_claim_interface | ( | struct usb_driver * | driver, |
struct usb_interface * | iface, | ||
void * | priv | ||
) |
usb_driver_claim_interface - bind a driver to an interface : the driver to be bound : the interface to which it will be bound; must be in the usb device's active configuration : driver data associated with that interface
This is used by usb device drivers that need to claim more than one interface on a device when probing (audio and acm are current examples). No device driver should directly modify internal usb_interface or usb_device structure members.
Few drivers should need to use this routine, since the most natural way to bind to an interface is to return the private data from the driver's probe() method.
Callers must own the device lock, so driver probe() entries don't need extra locking, but other call contexts may need to explicitly claim that lock.
void usb_driver_release_interface | ( | struct usb_driver * | driver, |
struct usb_interface * | iface | ||
) |
usb_driver_release_interface - unbind a driver from an interface : the driver to be unbound : the interface from which it will be unbound
This can be used by drivers to release an interface without waiting for their disconnect() methods to be called. In typical cases this also causes the driver disconnect() method to be called.
This call is synchronous, and may not be used in an interrupt context. Callers must own the device lock, so driver disconnect() entries don't need extra locking, but other call contexts may need to explicitly claim that lock.
void usb_forced_unbind_intf | ( | struct usb_interface * | intf | ) |
int usb_match_device | ( | struct usb_device * | dev, |
const struct usb_device_id * | id | ||
) |
|
read |
int usb_match_one_id | ( | struct usb_interface * | interface, |
const struct usb_device_id * | id | ||
) |
void usb_rebind_intf | ( | struct usb_interface * | intf | ) |
usb_register_device_driver - register a USB device (not interface) driver : USB operations for the device driver : module owner of this driver.
Registers a USB device driver with the USB core. The list of unattached devices will be rescanned whenever a new driver is added, allowing the new driver to attach to any recognized devices. Returns a negative error code on failure and 0 on success.
int usb_register_driver | ( | struct usb_driver * | new_driver, |
struct module * | owner, | ||
const char * | mod_name | ||
) |
usb_register_driver - register a USB interface driver : USB operations for the interface driver : module owner of this driver. : module name string
Registers a USB interface driver with the USB core. The list of unattached interfaces will be rescanned whenever a new driver is added, allowing the new driver to attach to any recognized interfaces. Returns a negative error code on failure and 0 on success.
NOTE: if you want your driver to use the USB major number, you must call usb_register_dev() to enable that functionality. This function no longer takes care of that.