Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gscps2.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/serio.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci_ids.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/parisc-device.h>

Go to the source code of this file.

Data Structures

struct  gscps2port
 

Macros

#define PFX   "gscps2.c: "
 
#define ENABLE   1
 
#define DISABLE   0
 
#define GSC_DINO_OFFSET   0x0800 /* offset for DINO controller versus LASI one */
 
#define GSC_ID   0x00 /* device ID offset (see: GSC_ID_XXX) */
 
#define GSC_RESET   0x00 /* reset port offset */
 
#define GSC_RCVDATA   0x04 /* receive port offset */
 
#define GSC_XMTDATA   0x04 /* transmit port offset */
 
#define GSC_CONTROL   0x08 /* see: Control register bits */
 
#define GSC_STATUS   0x0C /* see: Status register bits */
 
#define GSC_CTRL_ENBL   0x01 /* enable interface */
 
#define GSC_CTRL_LPBXR   0x02 /* loopback operation */
 
#define GSC_CTRL_DIAG   0x20 /* directly control clock/data line */
 
#define GSC_CTRL_DATDIR   0x40 /* data line direct control */
 
#define GSC_CTRL_CLKDIR   0x80 /* clock line direct control */
 
#define GSC_STAT_RBNE   0x01 /* Receive Buffer Not Empty */
 
#define GSC_STAT_TBNE   0x02 /* Transmit Buffer Not Empty */
 
#define GSC_STAT_TERR   0x04 /* Timeout Error */
 
#define GSC_STAT_PERR   0x08 /* Parity Error */
 
#define GSC_STAT_CMPINTR   0x10 /* Composite Interrupt = irq on any port */
 
#define GSC_STAT_DATSHD   0x40 /* Data Line Shadow */
 
#define GSC_STAT_CLKSHD   0x80 /* Clock Line Shadow */
 
#define GSC_ID_KEYBOARD   0 /* device ID values */
 
#define GSC_ID_MOUSE   1
 
#define BUFFER_SIZE   0x0f
 
#define gscps2_readb_input(x)   readb((x)+GSC_RCVDATA)
 
#define gscps2_readb_control(x)   readb((x)+GSC_CONTROL)
 
#define gscps2_readb_status(x)   readb((x)+GSC_STATUS)
 
#define gscps2_writeb_control(x, y)   writeb((x), (y)+GSC_CONTROL)
 

Functions

 MODULE_AUTHOR ("Laurent Canet <[email protected]>, Thibaut Varene <[email protected]>, Helge Deller <[email protected]>")
 
 MODULE_DESCRIPTION ("HP GSC PS2 port driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (parisc, gscps2_device_tbl)
 
 module_init (gscps2_init)
 
 module_exit (gscps2_exit)
 

Macro Definition Documentation

#define BUFFER_SIZE   0x0f

Definition at line 88 of file gscps2.c.

#define DISABLE   0

Definition at line 53 of file gscps2.c.

#define ENABLE   1

Definition at line 52 of file gscps2.c.

#define GSC_CONTROL   0x08 /* see: Control register bits */

Definition at line 62 of file gscps2.c.

#define GSC_CTRL_CLKDIR   0x80 /* clock line direct control */

Definition at line 70 of file gscps2.c.

#define GSC_CTRL_DATDIR   0x40 /* data line direct control */

Definition at line 69 of file gscps2.c.

#define GSC_CTRL_DIAG   0x20 /* directly control clock/data line */

Definition at line 68 of file gscps2.c.

#define GSC_CTRL_ENBL   0x01 /* enable interface */

Definition at line 66 of file gscps2.c.

#define GSC_CTRL_LPBXR   0x02 /* loopback operation */

Definition at line 67 of file gscps2.c.

#define GSC_DINO_OFFSET   0x0800 /* offset for DINO controller versus LASI one */

Definition at line 55 of file gscps2.c.

#define GSC_ID   0x00 /* device ID offset (see: GSC_ID_XXX) */

Definition at line 58 of file gscps2.c.

#define GSC_ID_KEYBOARD   0 /* device ID values */

Definition at line 82 of file gscps2.c.

#define GSC_ID_MOUSE   1

Definition at line 83 of file gscps2.c.

#define GSC_RCVDATA   0x04 /* receive port offset */

Definition at line 60 of file gscps2.c.

#define GSC_RESET   0x00 /* reset port offset */

Definition at line 59 of file gscps2.c.

#define GSC_STAT_CLKSHD   0x80 /* Clock Line Shadow */

Definition at line 79 of file gscps2.c.

#define GSC_STAT_CMPINTR   0x10 /* Composite Interrupt = irq on any port */

Definition at line 77 of file gscps2.c.

#define GSC_STAT_DATSHD   0x40 /* Data Line Shadow */

Definition at line 78 of file gscps2.c.

#define GSC_STAT_PERR   0x08 /* Parity Error */

Definition at line 76 of file gscps2.c.

#define GSC_STAT_RBNE   0x01 /* Receive Buffer Not Empty */

Definition at line 73 of file gscps2.c.

#define GSC_STAT_TBNE   0x02 /* Transmit Buffer Not Empty */

Definition at line 74 of file gscps2.c.

#define GSC_STAT_TERR   0x04 /* Timeout Error */

Definition at line 75 of file gscps2.c.

#define GSC_STATUS   0x0C /* see: Status register bits */

Definition at line 63 of file gscps2.c.

#define GSC_XMTDATA   0x04 /* transmit port offset */

Definition at line 61 of file gscps2.c.

#define gscps2_readb_control (   x)    readb((x)+GSC_CONTROL)

Definition at line 110 of file gscps2.c.

#define gscps2_readb_input (   x)    readb((x)+GSC_RCVDATA)

Definition at line 109 of file gscps2.c.

#define gscps2_readb_status (   x)    readb((x)+GSC_STATUS)

Definition at line 111 of file gscps2.c.

#define gscps2_writeb_control (   x,
  y 
)    writeb((x), (y)+GSC_CONTROL)

Definition at line 112 of file gscps2.c.

#define PFX   "gscps2.c: "

Definition at line 45 of file gscps2.c.

Function Documentation

MODULE_AUTHOR ( "Laurent Canet <[email protected] ,
Thibaut Varene< varenet @parisc-linux.org >  ,
Helge Deller< deller @gmx.de >"   
)
MODULE_DESCRIPTION ( "HP GSC PS2 port driver )
MODULE_DEVICE_TABLE ( parisc  ,
gscps2_device_tbl   
)
module_exit ( gscps2_exit  )
module_init ( gscps2_init  )
MODULE_LICENSE ( "GPL"  )