Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
base.h File Reference

Go to the source code of this file.

Data Structures

struct  pnp_port
 
struct  pnp_irq_mask_t
 
struct  pnp_irq
 
struct  pnp_dma
 
struct  pnp_mem
 
struct  pnp_option
 
struct  pnp_resource
 

Macros

#define PNP_EISA_ID_MASK   0x7fffffff
 
#define PNP_IRQ_NR   256
 
#define PNP_OPTION_DEPENDENT   0x80000000
 
#define PNP_OPTION_SET_MASK   0xffff
 
#define PNP_OPTION_SET_SHIFT   12
 
#define PNP_OPTION_PRIORITY_MASK   0xfff
 
#define PNP_OPTION_PRIORITY_SHIFT   0
 
#define PNP_RES_PRIORITY_PREFERRED   0
 
#define PNP_RES_PRIORITY_ACCEPTABLE   1
 
#define PNP_RES_PRIORITY_FUNCTIONAL   2
 
#define PNP_RES_PRIORITY_INVALID   PNP_OPTION_PRIORITY_MASK
 
#define pnp_dbg(dev, format, arg...)   ({ if (0) dev_printk(KERN_DEBUG, dev, format, ## arg); 0; })
 

Functions

voidpnp_alloc (long size)
 
int pnp_register_protocol (struct pnp_protocol *protocol)
 
void pnp_unregister_protocol (struct pnp_protocol *protocol)
 
void pnp_eisa_id_to_string (u32 id, char *str)
 
struct pnp_devpnp_alloc_dev (struct pnp_protocol *, int id, const char *pnpid)
 
struct pnp_cardpnp_alloc_card (struct pnp_protocol *, int id, char *pnpid)
 
int pnp_add_device (struct pnp_dev *dev)
 
struct pnp_idpnp_add_id (struct pnp_dev *dev, const char *id)
 
int pnp_add_card (struct pnp_card *card)
 
void pnp_remove_card (struct pnp_card *card)
 
int pnp_add_card_device (struct pnp_card *card, struct pnp_dev *dev)
 
void pnp_remove_card_device (struct pnp_dev *dev)
 
int pnp_register_irq_resource (struct pnp_dev *dev, unsigned int option_flags, pnp_irq_mask_t *map, unsigned char flags)
 
int pnp_register_dma_resource (struct pnp_dev *dev, unsigned int option_flags, unsigned char map, unsigned char flags)
 
int pnp_register_port_resource (struct pnp_dev *dev, unsigned int option_flags, resource_size_t min, resource_size_t max, resource_size_t align, resource_size_t size, unsigned char flags)
 
int pnp_register_mem_resource (struct pnp_dev *dev, unsigned int option_flags, resource_size_t min, resource_size_t max, resource_size_t align, resource_size_t size, unsigned char flags)
 
charpnp_option_priority_name (struct pnp_option *option)
 
void dbg_pnp_show_option (struct pnp_dev *dev, struct pnp_option *option)
 
void pnp_init_resources (struct pnp_dev *dev)
 
void pnp_fixup_device (struct pnp_dev *dev)
 
void pnp_free_options (struct pnp_dev *dev)
 
int __pnp_add_device (struct pnp_dev *dev)
 
void __pnp_remove_device (struct pnp_dev *dev)
 
int pnp_check_port (struct pnp_dev *dev, struct resource *res)
 
int pnp_check_mem (struct pnp_dev *dev, struct resource *res)
 
int pnp_check_irq (struct pnp_dev *dev, struct resource *res)
 
charpnp_resource_type_name (struct resource *res)
 
void dbg_pnp_show_resources (struct pnp_dev *dev, char *desc)
 
void pnp_free_resources (struct pnp_dev *dev)
 
unsigned long pnp_resource_type (struct resource *res)
 
void pnp_free_resource (struct pnp_resource *pnp_res)
 
struct pnp_resourcepnp_add_irq_resource (struct pnp_dev *dev, int irq, int flags)
 
struct pnp_resourcepnp_add_dma_resource (struct pnp_dev *dev, int dma, int flags)
 
struct pnp_resourcepnp_add_io_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end, int flags)
 
struct pnp_resourcepnp_add_mem_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end, int flags)
 
struct pnp_resourcepnp_add_bus_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end)
 

Variables

spinlock_t pnp_lock
 
struct device_attribute pnp_interface_attrs []
 
int pnp_debug
 

Macro Definition Documentation

#define pnp_dbg (   dev,
  format,
  arg... 
)    ({ if (0) dev_printk(KERN_DEBUG, dev, format, ## arg); 0; })

Definition at line 182 of file base.h.

#define PNP_EISA_ID_MASK   0x7fffffff

Definition at line 13 of file base.h.

#define PNP_IRQ_NR   256

Definition at line 35 of file base.h.

#define PNP_OPTION_DEPENDENT   0x80000000

Definition at line 56 of file base.h.

#define PNP_OPTION_PRIORITY_MASK   0xfff

Definition at line 59 of file base.h.

#define PNP_OPTION_PRIORITY_SHIFT   0

Definition at line 60 of file base.h.

#define PNP_OPTION_SET_MASK   0xffff

Definition at line 57 of file base.h.

#define PNP_OPTION_SET_SHIFT   12

Definition at line 58 of file base.h.

#define PNP_RES_PRIORITY_ACCEPTABLE   1

Definition at line 63 of file base.h.

#define PNP_RES_PRIORITY_FUNCTIONAL   2

Definition at line 64 of file base.h.

#define PNP_RES_PRIORITY_INVALID   PNP_OPTION_PRIORITY_MASK

Definition at line 65 of file base.h.

#define PNP_RES_PRIORITY_PREFERRED   0

Definition at line 62 of file base.h.

Function Documentation

int __pnp_add_device ( struct pnp_dev dev)

Definition at line 160 of file core.c.

void __pnp_remove_device ( struct pnp_dev dev)

Definition at line 204 of file core.c.

void dbg_pnp_show_option ( struct pnp_dev dev,
struct pnp_option option 
)

Definition at line 104 of file support.c.

void dbg_pnp_show_resources ( struct pnp_dev dev,
char desc 
)

Definition at line 78 of file support.c.

struct pnp_resource* pnp_add_bus_resource ( struct pnp_dev dev,
resource_size_t  start,
resource_size_t  end 
)
read

Definition at line 596 of file resource.c.

int pnp_add_card ( struct pnp_card card)

pnp_add_card - adds a PnP card to the PnP Layer : pointer to the card to add

Definition at line 232 of file card.c.

int pnp_add_card_device ( struct pnp_card card,
struct pnp_dev dev 
)

pnp_add_card_device - adds a device to the specified card : pointer to the card to add to : pointer to the device to add

Definition at line 293 of file card.c.

int pnp_add_device ( struct pnp_dev dev)

Definition at line 180 of file core.c.

struct pnp_resource* pnp_add_dma_resource ( struct pnp_dev dev,
int  dma,
int  flags 
)
read

Definition at line 527 of file resource.c.

struct pnp_id* pnp_add_id ( struct pnp_dev dev,
const char id 
)
read

pnp_add_id - adds an EISA id to the specified device : pointer to the desired device : pointer to an EISA id string

Definition at line 242 of file driver.c.

struct pnp_resource* pnp_add_io_resource ( struct pnp_dev dev,
resource_size_t  start,
resource_size_t  end,
int  flags 
)
read

Definition at line 548 of file resource.c.

struct pnp_resource* pnp_add_irq_resource ( struct pnp_dev dev,
int  irq,
int  flags 
)
read

Definition at line 506 of file resource.c.

struct pnp_resource* pnp_add_mem_resource ( struct pnp_dev dev,
resource_size_t  start,
resource_size_t  end,
int  flags 
)
read

Definition at line 572 of file resource.c.

void* pnp_alloc ( long  size)

Definition at line 32 of file core.c.

struct pnp_card* pnp_alloc_card ( struct pnp_protocol ,
int  id,
char pnpid 
)
read

Definition at line 155 of file card.c.

struct pnp_dev* pnp_alloc_dev ( struct pnp_protocol ,
int  id,
const char pnpid 
)
read

Definition at line 127 of file core.c.

int pnp_check_irq ( struct pnp_dev dev,
struct resource res 
)

Definition at line 349 of file resource.c.

int pnp_check_mem ( struct pnp_dev dev,
struct resource res 
)

Definition at line 227 of file resource.c.

int pnp_check_port ( struct pnp_dev dev,
struct resource res 
)

Definition at line 165 of file resource.c.

void pnp_eisa_id_to_string ( u32  id,
char str 
)

Definition at line 39 of file support.c.

void pnp_fixup_device ( struct pnp_dev dev)

Definition at line 370 of file quirks.c.

void pnp_free_options ( struct pnp_dev dev)

Definition at line 142 of file resource.c.

void pnp_free_resource ( struct pnp_resource pnp_res)

Definition at line 102 of file core.c.

void pnp_free_resources ( struct pnp_dev dev)

Definition at line 108 of file core.c.

void pnp_init_resources ( struct pnp_dev dev)

Definition at line 216 of file manager.c.

char* pnp_option_priority_name ( struct pnp_option option)

Definition at line 91 of file support.c.

int pnp_register_dma_resource ( struct pnp_dev dev,
unsigned int  option_flags,
unsigned char  map,
unsigned char  flags 
)

Definition at line 78 of file resource.c.

int pnp_register_irq_resource ( struct pnp_dev dev,
unsigned int  option_flags,
pnp_irq_mask_t map,
unsigned char  flags 
)

Definition at line 50 of file resource.c.

int pnp_register_mem_resource ( struct pnp_dev dev,
unsigned int  option_flags,
resource_size_t  min,
resource_size_t  max,
resource_size_t  align,
resource_size_t  size,
unsigned char  flags 
)

Definition at line 119 of file resource.c.

int pnp_register_port_resource ( struct pnp_dev dev,
unsigned int  option_flags,
resource_size_t  min,
resource_size_t  max,
resource_size_t  align,
resource_size_t  size,
unsigned char  flags 
)

Definition at line 96 of file resource.c.

int pnp_register_protocol ( struct pnp_protocol protocol)

Definition at line 50 of file core.c.

void pnp_remove_card ( struct pnp_card card)

pnp_remove_card - removes a PnP card from the PnP Layer : pointer to the card to remove

Definition at line 273 of file card.c.

void pnp_remove_card_device ( struct pnp_dev dev)

pnp_remove_card_device- removes a device from the specified card : pointer to the device to remove

Definition at line 310 of file card.c.

unsigned long pnp_resource_type ( struct resource res)

Definition at line 472 of file resource.c.

char* pnp_resource_type_name ( struct resource res)

Definition at line 61 of file support.c.

void pnp_unregister_protocol ( struct pnp_protocol protocol)

Definition at line 81 of file core.c.

Variable Documentation

int pnp_debug

Definition at line 220 of file core.c.

struct device_attribute pnp_interface_attrs[]

Definition at line 421 of file interface.c.

spinlock_t pnp_lock