Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
inode.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/uts.h>
#include <linux/wait.h>
#include <linux/compiler.h>
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/device.h>
#include <linux/moduleparam.h>
#include <linux/usb/gadgetfs.h>
#include <linux/usb/gadget.h>

Go to the source code of this file.

Data Structures

struct  dev_data
 
struct  ep_data
 
struct  kiocb_priv
 

Macros

#define DRIVER_DESC   "USB Gadget filesystem"
 
#define DRIVER_VERSION   "24 Aug 2004"
 
#define GADGETFS_MAGIC   0xaee71ee7
 
#define DMA_ADDR_INVALID   (~(dma_addr_t)0)
 
#define N_EVENT   5
 
#define xprintk(d, level, fmt, args...)   printk(level "%s: " fmt , shortname , ## args)
 
#define DBG(dev, fmt, args...)   do { } while (0)
 
#define VDEBUG(dev, fmt, args...)   do { } while (0)
 
#define ERROR(dev, fmt, args...)   xprintk(dev , KERN_ERR , fmt , ## args)
 
#define INFO(dev, fmt, args...)   xprintk(dev , KERN_INFO , fmt , ## args)
 

Enumerations

enum  ep0_state {
  EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_CONFIG,
  EP0_STALL, STATE_DEV_DISABLED = 0, STATE_DEV_OPENED, STATE_DEV_UNCONNECTED,
  STATE_DEV_CONNECTED, STATE_DEV_SETUP, STATE_DEV_UNBOUND, EP0_IDLE,
  EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_END_XFER, EP0_STALL,
  WAIT_FOR_SETUP, SETUP_STAGE, IN_DATA_STAGE, OUT_DATA_STAGE,
  IN_STATUS_STAGE, OUT_STATUS_STAGE, STALL, WAIT_ACK_SET_CONF_INTERF,
  EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_END_XFER,
  EP0_STALL
}
 
enum  ep_state { STATE_EP_DISABLED = 0, STATE_EP_READY, STATE_EP_ENABLED, STATE_EP_UNBOUND }
 

Functions

 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_AUTHOR ("David Brownell")
 
 MODULE_LICENSE ("GPL")
 
 module_param (default_uid, uint, 0644)
 
 module_param (default_gid, uint, 0644)
 
 module_param (default_perm, uint, 0644)
 
 module_init (init)
 
 module_exit (cleanup)
 

Macro Definition Documentation

#define DBG (   dev,
  fmt,
  args... 
)    do { } while (0)

Definition at line 243 of file inode.c.

#define DMA_ADDR_INVALID   (~(dma_addr_t)0)

Definition at line 79 of file inode.c.

#define DRIVER_DESC   "USB Gadget filesystem"

Definition at line 65 of file inode.c.

#define DRIVER_VERSION   "24 Aug 2004"

Definition at line 66 of file inode.c.

#define ERROR (   dev,
  fmt,
  args... 
)    xprintk(dev , KERN_ERR , fmt , ## args)

Definition at line 254 of file inode.c.

#define GADGETFS_MAGIC   0xaee71ee7

Definition at line 78 of file inode.c.

#define INFO (   dev,
  fmt,
  args... 
)    xprintk(dev , KERN_INFO , fmt , ## args)

Definition at line 256 of file inode.c.

#define N_EVENT   5

Definition at line 110 of file inode.c.

#define VDEBUG (   dev,
  fmt,
  args... 
)    do { } while (0)

Definition at line 250 of file inode.c.

#define xprintk (   d,
  level,
  fmt,
  args... 
)    printk(level "%s: " fmt , shortname , ## args)

Definition at line 236 of file inode.c.

Enumeration Type Documentation

enum ep0_state
Enumerator:
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_CONFIG 
EP0_STALL 
STATE_DEV_DISABLED 
STATE_DEV_OPENED 
STATE_DEV_UNCONNECTED 
STATE_DEV_CONNECTED 
STATE_DEV_SETUP 
STATE_DEV_UNBOUND 
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_END_XFER 
EP0_STALL 
WAIT_FOR_SETUP 
SETUP_STAGE 
IN_DATA_STAGE 
OUT_DATA_STAGE 
IN_STATUS_STAGE 
OUT_STATUS_STAGE 
STALL 
WAIT_ACK_SET_CONF_INTERF 
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_END_XFER 
EP0_STALL 

Definition at line 82 of file inode.c.

enum ep_state
Enumerator:
STATE_EP_DISABLED 
STATE_EP_READY 
STATE_EP_ENABLED 
STATE_EP_UNBOUND 

Definition at line 179 of file inode.c.

Function Documentation

MODULE_AUTHOR ( "David Brownell"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
module_exit ( cleanup  )
module_init ( init  )
MODULE_LICENSE ( "GPL"  )
module_param ( default_uid  ,
uint  ,
0644   
)
module_param ( default_gid  ,
uint  ,
0644   
)
module_param ( default_perm  ,
uint  ,
0644   
)