Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hilkbd.c File Reference
#include <linux/pci_ids.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/hil.h>
#include <linux/io.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <asm/irq.h>

Go to the source code of this file.

Macros

#define hil_busy()   (hil_readb(HILBASE + HIL_CMD) & HIL_BUSY)
 
#define hil_data_available()   (hil_readb(HILBASE + HIL_CMD) & HIL_DATA_RDY)
 
#define hil_status()   (hil_readb(HILBASE + HIL_CMD))
 
#define hil_command(x)   do { hil_writeb((x), HILBASE + HIL_CMD); } while (0)
 
#define hil_read_data()   (hil_readb(HILBASE + HIL_DATA))
 
#define hil_write_data(x)   do { hil_writeb((x), HILBASE + HIL_DATA); } while (0)
 
#define HIL_BUSY   0x02
 
#define HIL_DATA_RDY   0x01
 
#define HIL_SETARD   0xA0 /* set auto-repeat delay */
 
#define HIL_SETARR   0xA2 /* set auto-repeat rate */
 
#define HIL_SETTONE   0xA3 /* set tone generator */
 
#define HIL_CNMT   0xB2 /* clear nmi */
 
#define HIL_INTON   0x5C /* Turn on interrupts. */
 
#define HIL_INTOFF   0x5D /* Turn off interrupts. */
 
#define HIL_READKBDSADR   0xF9
 
#define HIL_WRITEKBDSADR   0xE9
 

Functions

 MODULE_AUTHOR ("Philip Blundell, Matthew Wilcox, Helge Deller")
 
 MODULE_DESCRIPTION ("HIL keyboard driver (basic functionality)")
 
 MODULE_LICENSE ("GPL v2")
 
 module_init (hil_init)
 
 module_exit (hil_exit)
 

Macro Definition Documentation

#define hil_busy ( )    (hil_readb(HILBASE + HIL_CMD) & HIL_BUSY)

Definition at line 71 of file hilkbd.c.

#define HIL_BUSY   0x02

Definition at line 80 of file hilkbd.c.

#define HIL_CNMT   0xB2 /* clear nmi */

Definition at line 86 of file hilkbd.c.

#define hil_command (   x)    do { hil_writeb((x), HILBASE + HIL_CMD); } while (0)

Definition at line 74 of file hilkbd.c.

#define hil_data_available ( )    (hil_readb(HILBASE + HIL_CMD) & HIL_DATA_RDY)

Definition at line 72 of file hilkbd.c.

#define HIL_DATA_RDY   0x01

Definition at line 81 of file hilkbd.c.

#define HIL_INTOFF   0x5D /* Turn off interrupts. */

Definition at line 88 of file hilkbd.c.

#define HIL_INTON   0x5C /* Turn on interrupts. */

Definition at line 87 of file hilkbd.c.

#define hil_read_data ( )    (hil_readb(HILBASE + HIL_DATA))

Definition at line 75 of file hilkbd.c.

#define HIL_READKBDSADR   0xF9

Definition at line 90 of file hilkbd.c.

#define HIL_SETARD   0xA0 /* set auto-repeat delay */

Definition at line 83 of file hilkbd.c.

#define HIL_SETARR   0xA2 /* set auto-repeat rate */

Definition at line 84 of file hilkbd.c.

#define HIL_SETTONE   0xA3 /* set tone generator */

Definition at line 85 of file hilkbd.c.

#define hil_status ( )    (hil_readb(HILBASE + HIL_CMD))

Definition at line 73 of file hilkbd.c.

#define hil_write_data (   x)    do { hil_writeb((x), HILBASE + HIL_DATA); } while (0)

Definition at line 76 of file hilkbd.c.

#define HIL_WRITEKBDSADR   0xE9

Definition at line 91 of file hilkbd.c.

Function Documentation

MODULE_AUTHOR ( "Philip  Blundell,
Matthew  Wilcox,
Helge Deller"   
)
MODULE_DESCRIPTION ( "HIL keyboard driver (basic functionality)"  )
module_exit ( hil_exit  )
module_init ( hil_init  )
MODULE_LICENSE ( "GPL v2 )

Variable Documentation

unsigned char c

Definition at line 103 of file hilkbd.c.

unsigned int curdev

Definition at line 100 of file hilkbd.c.

unsigned char data[16]

Definition at line 106 of file hilkbd.c.

struct input_dev* dev

Definition at line 98 of file hilkbd.c.

void* dev_id

Definition at line 110 of file hilkbd.c.

spinlock_t lock

Definition at line 108 of file hilkbd.c.

unsigned int ptr

Definition at line 107 of file hilkbd.c.

unsigned char s

Definition at line 102 of file hilkbd.c.

int valid

Definition at line 104 of file hilkbd.c.