Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures
uio_driver.h File Reference
#include <linux/fs.h>
#include <linux/interrupt.h>

Go to the source code of this file.

Data Structures

struct  uio_mem
 
struct  uio_port
 
struct  uio_info
 

Macros

: name of the memory region for identification

struct uio_mem - description of a UIO memory region

: address of the device's memory (phys_addr is used since addr can be logical, virtual, or physical & phys_addr_t should always be large enough to handle any of the address types) : size of IO : type of memory addr points to : ioremap-ped version of addr, for driver internal use : for use by the UIO core only.

#define MAX_UIO_MAPS   5
 
: name of the port region for identification

struct uio_port - description of a UIO port region

: start of port region : size of port region : type of port (see UIO_PORT_* below) : for use by the UIO core only.

#define MAX_UIO_PORT_REGIONS   5
 

: device name

struct uio_info - UIO device capabilities : the UIO device this info belongs to

Version
: device driver version : list of mappable memory regions, size==0 for end of list : list of port regions, size==0 for end of list : interrupt number or UIO_IRQ_CUSTOM : flags for request_irq() : optional private data : the device's irq handler : mmap operation for this uio device : open operation for this uio device : release operation for this uio device : disable/enable irqs when 0/1 is written to /dev/uioX
#define uio_register_device(parent, info)   __uio_register_device(THIS_MODULE, parent, info)
 
#define UIO_IRQ_CUSTOM   -1
 
#define UIO_IRQ_NONE   0
 
#define UIO_MEM_NONE   0
 
#define UIO_MEM_PHYS   1
 
#define UIO_MEM_LOGICAL   2
 
#define UIO_MEM_VIRTUAL   3
 
#define UIO_PORT_NONE   0
 
#define UIO_PORT_X86   1
 
#define UIO_PORT_GPIO   2
 
#define UIO_PORT_OTHER   3
 
int __must_check __uio_register_device (struct module *owner, struct device *parent, struct uio_info *info)
 
void uio_unregister_device (struct uio_info *info)
 
void uio_event_notify (struct uio_info *info)
 

Macro Definition Documentation

#define MAX_UIO_MAPS   5

Definition at line 44 of file uio_driver.h.

#define MAX_UIO_PORT_REGIONS   5

Definition at line 64 of file uio_driver.h.

#define UIO_IRQ_CUSTOM   -1

Definition at line 113 of file uio_driver.h.

#define UIO_IRQ_NONE   0

Definition at line 114 of file uio_driver.h.

#define UIO_MEM_LOGICAL   2

Definition at line 119 of file uio_driver.h.

#define UIO_MEM_NONE   0

Definition at line 117 of file uio_driver.h.

#define UIO_MEM_PHYS   1

Definition at line 118 of file uio_driver.h.

#define UIO_MEM_VIRTUAL   3

Definition at line 120 of file uio_driver.h.

#define UIO_PORT_GPIO   2

Definition at line 125 of file uio_driver.h.

#define UIO_PORT_NONE   0

Definition at line 123 of file uio_driver.h.

#define UIO_PORT_OTHER   3

Definition at line 126 of file uio_driver.h.

#define UIO_PORT_X86   1

Definition at line 124 of file uio_driver.h.

#define uio_register_device (   parent,
  info 
)    __uio_register_device(THIS_MODULE, parent, info)

Definition at line 106 of file uio_driver.h.

Function Documentation

int __must_check __uio_register_device ( struct module owner,
struct device parent,
struct uio_info info 
)

uio_register_device - register a new userspace IO device : module that creates the new device : parent device : UIO device capabilities

returns zero on success or a negative error code.

Definition at line 801 of file uio.c.

void uio_event_notify ( struct uio_info info)

uio_event_notify - trigger an interrupt event : UIO device capabilities

Definition at line 407 of file uio.c.

void uio_unregister_device ( struct uio_info info)

uio_unregister_device - unregister a industrial IO device : UIO device capabilities

Definition at line 870 of file uio.c.