Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cdc-wdm.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include <linux/bitops.h>
#include <linux/poll.h>
#include <linux/usb.h>
#include <linux/usb/cdc.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <linux/usb/cdc-wdm.h>

Go to the source code of this file.

Data Structures

struct  wdm_device
 

Macros

#define DRIVER_VERSION   "v0.03"
 
#define DRIVER_AUTHOR   "Oliver Neukum"
 
#define DRIVER_DESC   "USB Abstract Control Model driver for USB WCM Device Management"
 
#define WDM_MINOR_BASE   176
 
#define WDM_IN_USE   1
 
#define WDM_DISCONNECTING   2
 
#define WDM_RESULT   3
 
#define WDM_READ   4
 
#define WDM_INT_STALL   5
 
#define WDM_POLL_RUNNING   6
 
#define WDM_RESPONDING   7
 
#define WDM_SUSPENDING   8
 
#define WDM_RESETTING   9
 
#define WDM_MAX   16
 
#define WDM_DEFAULT_BUFSIZE   256
 

Functions

 MODULE_DEVICE_TABLE (usb, wdm_ids)
 
struct usb_driver * usb_cdc_wdm_register (struct usb_interface *intf, struct usb_endpoint_descriptor *ep, int bufsize, int(*manage_power)(struct usb_interface *, int))
 
 EXPORT_SYMBOL (usb_cdc_wdm_register)
 
 module_usb_driver (wdm_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DRIVER_AUTHOR   "Oliver Neukum"

Definition at line 32 of file cdc-wdm.c.

#define DRIVER_DESC   "USB Abstract Control Model driver for USB WCM Device Management"

Definition at line 33 of file cdc-wdm.c.

#define DRIVER_VERSION   "v0.03"

Definition at line 31 of file cdc-wdm.c.

#define WDM_DEFAULT_BUFSIZE   256

Definition at line 63 of file cdc-wdm.c.

#define WDM_DISCONNECTING   2

Definition at line 51 of file cdc-wdm.c.

#define WDM_IN_USE   1

Definition at line 50 of file cdc-wdm.c.

#define WDM_INT_STALL   5

Definition at line 54 of file cdc-wdm.c.

#define WDM_MAX   16

Definition at line 60 of file cdc-wdm.c.

#define WDM_MINOR_BASE   176

Definition at line 47 of file cdc-wdm.c.

#define WDM_POLL_RUNNING   6

Definition at line 55 of file cdc-wdm.c.

#define WDM_READ   4

Definition at line 53 of file cdc-wdm.c.

#define WDM_RESETTING   9

Definition at line 58 of file cdc-wdm.c.

#define WDM_RESPONDING   7

Definition at line 56 of file cdc-wdm.c.

#define WDM_RESULT   3

Definition at line 52 of file cdc-wdm.c.

#define WDM_SUSPENDING   8

Definition at line 57 of file cdc-wdm.c.

Function Documentation

EXPORT_SYMBOL ( usb_cdc_wdm_register  )
MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
wdm_ids   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( wdm_driver  )
struct usb_driver* usb_cdc_wdm_register ( struct usb_interface intf,
struct usb_endpoint_descriptor ep,
int  bufsize,
int(*)(struct usb_interface *, int manage_power 
)
read

usb_cdc_wdm_register - register a WDM subdriver : usb interface the subdriver will associate with : interrupt endpoint to monitor for notifications : maximum message size to support for read/write

Create WDM usb class character device and associate it with intf without binding, allowing another driver to manage the interface.

The subdriver will manage the given interrupt endpoint exclusively and will issue control requests referring to the given intf. It will otherwise avoid interferring, and in particular not do usb_set_intfdata/usb_get_intfdata on intf.

The return value is a pointer to the subdriver's struct usb_driver. The registering driver is responsible for calling this subdriver's disconnect, suspend, resume, pre_reset and post_reset methods from its own.

Definition at line 860 of file cdc-wdm.c.