nidas  v1.2-1520
Macros | Functions | Variables
pcmcom8.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/fcntl.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#include <linux/utsname.h>
#include <nidas/linux/ver_macros.h>
#include <nidas/linux/isa_bus.h>
#include <nidas/linux/klog.h>
#include "pcmcom8.h"
#include <nidas/linux/Revision.h>

Macros

#define DRIVER_NAME   "pcmcom8"
 
#define REPO_REVISION   "unknown"
 
#define PCMCOM8_LOCK(x)   mutex_lock_interruptible(x)
 
#define PCMCOM8_UNLOCK(x)   mutex_unlock(x)
 

Functions

 module_param_array (ioports, uint, pcmcom8_numboards, S_IRUGO)
 
 MODULE_AUTHOR ("Gordon Maclean")
 
 MODULE_DESCRIPTION ("driver module to initialize pcmcom8 serial port card")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 MODULE_VERSION (REPO_REVISION)
 
static int pcmcom8_check_config (struct pcmcom8_config *config)
 
static void pcmcom8_enable_ports (pcmcom8_board *brd)
 
static void pcmcom8_read_config (pcmcom8_board *brd)
 
static int pcmcom8_write_config (pcmcom8_board *brd, struct pcmcom8_config *config)
 
static int pcmcom8_wait_eedone (pcmcom8_board *brd)
 
static int pcmcom8_write_eeprom (pcmcom8_board *brd, int eeaddr, unsigned int value)
 
static int pcmcom8_read_eeconfig (pcmcom8_board *brd, struct pcmcom8_config *config, int eeaddr)
 
static int pcmcom8_write_eeconfig (pcmcom8_board *brd, struct pcmcom8_config *config, int eeaddr)
 
static int pcmcom8_load_config_from_eeprom (pcmcom8_board *brd, int eeaddr)
 
static int pcmcom8_open (struct inode *inode, struct file *filp)
 
static int pcmcom8_release (struct inode *inode, struct file *filp)
 
static long pcmcom8_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
 
static void pcmcom8_cleanup_module (void)
 
static int __init pcmcom8_init_module (void)
 
 module_init (pcmcom8_init_module)
 
 module_exit (pcmcom8_cleanup_module)
 

Variables

static unsigned long ioport_base = (unsigned long) SYSTEM_ISA_IOPORT_BASE
 
static int pcmcom8_major = PCMCOM8_MAJOR
 
static unsigned int ioports [PCMCOM8_MAX_NR_DEVS] = {0,0,0,0}
 
static int pcmcom8_numboards = 0
 
static int pcmcom8_nr_ok = 0
 
static pcmcom8_board * pcmcom8_boards = 0
 
static dev_t pcmcom8_device = MKDEV(0,0)
 
static struct class * pcmcom8_class
 
static struct file_operations pcmcom8_fops
 

Macro Definition Documentation

#define DRIVER_NAME   "pcmcom8"
#define PCMCOM8_LOCK (   x)    mutex_lock_interruptible(x)

Referenced by pcmcom8_ioctl(), and pcmcom8_open().

#define PCMCOM8_UNLOCK (   x)    mutex_unlock(x)

Referenced by pcmcom8_ioctl(), and pcmcom8_open().

#define REPO_REVISION   "unknown"

Referenced by pcmcom8_init_module().

Function Documentation

MODULE_AUTHOR ( "Gordon Maclean"  )
MODULE_DESCRIPTION ( "driver module to initialize pcmcom8 serial port card"  )
module_exit ( pcmcom8_cleanup_module  )
module_init ( pcmcom8_init_module  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param_array ( ioports  ,
uint  ,
pcmcom8_numboards  ,
S_IRUGO   
)
MODULE_VERSION ( REPO_REVISION  )
static int pcmcom8_check_config ( struct pcmcom8_config config)
static
static void pcmcom8_cleanup_module ( void  )
static
static void pcmcom8_enable_ports ( pcmcom8_board *  brd)
static

References PCMCOM8_NR_PORTS.

Referenced by pcmcom8_ioctl().

static int __init pcmcom8_init_module ( void  )
static
static long pcmcom8_ioctl ( struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
)
static
static int pcmcom8_load_config_from_eeprom ( pcmcom8_board *  brd,
int  eeaddr 
)
static
static int pcmcom8_open ( struct inode *  inode,
struct file *  filp 
)
static
static void pcmcom8_read_config ( pcmcom8_board *  brd)
static
static int pcmcom8_read_eeconfig ( pcmcom8_board *  brd,
struct pcmcom8_config config,
int  eeaddr 
)
static
static int pcmcom8_release ( struct inode *  inode,
struct file *  filp 
)
static
static int pcmcom8_wait_eedone ( pcmcom8_board *  brd)
static
static int pcmcom8_write_config ( pcmcom8_board *  brd,
struct pcmcom8_config config 
)
static
static int pcmcom8_write_eeconfig ( pcmcom8_board *  brd,
struct pcmcom8_config config,
int  eeaddr 
)
static
static int pcmcom8_write_eeprom ( pcmcom8_board *  brd,
int  eeaddr,
unsigned int  value 
)
static

References pcmcom8_wait_eedone().

Referenced by pcmcom8_write_eeconfig().

Variable Documentation

unsigned long ioport_base = (unsigned long) SYSTEM_ISA_IOPORT_BASE
static
unsigned int ioports[PCMCOM8_MAX_NR_DEVS] = {0,0,0,0}
static

Referenced by pcmcom8_init_module().

pcmcom8_board* pcmcom8_boards = 0
static
struct class* pcmcom8_class
static
dev_t pcmcom8_device = MKDEV(0,0)
static
struct file_operations pcmcom8_fops
static
Initial value:
= {
.owner = THIS_MODULE,
.unlocked_ioctl = pcmcom8_ioctl,
.open = pcmcom8_open,
.release = pcmcom8_release,
.llseek = no_llseek,
}
static int pcmcom8_open(struct inode *inode, struct file *filp)
Definition: pcmcom8.c:313
static long pcmcom8_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
Definition: pcmcom8.c:346
static int pcmcom8_release(struct inode *inode, struct file *filp)
Definition: pcmcom8.c:338
int pcmcom8_major = PCMCOM8_MAJOR
static

Referenced by pcmcom8_cleanup_module().

int pcmcom8_nr_ok = 0
static
int pcmcom8_numboards = 0
static