Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
i8042.c File Reference
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/err.h>
#include <linux/rcupdate.h>
#include <linux/platform_device.h>
#include <linux/i8042.h>
#include <linux/slab.h>
#include <asm/io.h>
#include "i8042.h"

Go to the source code of this file.

Data Structures

struct  i8042_port
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DEBUG
 
#define I8042_KBD_PORT_NO   0
 
#define I8042_AUX_PORT_NO   1
 
#define I8042_MUX_PORT_NO   2
 
#define I8042_NUM_PORTS   (I8042_NUM_MUX_PORTS + 2)
 
#define DELAY   do { mdelay(1); if (++delay > 10) return delay; } while(0)
 

Functions

 MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>")
 
 MODULE_DESCRIPTION ("i8042 keyboard and mouse controller driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (nokbd, i8042_nokbd, bool, 0)
 
 MODULE_PARM_DESC (nokbd,"Do not probe or use KBD port.")
 
 module_param_named (noaux, i8042_noaux, bool, 0)
 
 MODULE_PARM_DESC (noaux,"Do not probe or use AUX (mouse) port.")
 
 module_param_named (nomux, i8042_nomux, bool, 0)
 
 MODULE_PARM_DESC (nomux,"Do not check whether an active multiplexing controller is present.")
 
 module_param_named (unlock, i8042_unlock, bool, 0)
 
 MODULE_PARM_DESC (unlock,"Ignore keyboard lock.")
 
 module_param_named (reset, i8042_reset, bool, 0)
 
 MODULE_PARM_DESC (reset,"Reset controller during init and cleanup.")
 
 module_param_named (direct, i8042_direct, bool, 0)
 
 MODULE_PARM_DESC (direct,"Put keyboard port into non-translated mode.")
 
 module_param_named (dumbkbd, i8042_dumbkbd, bool, 0)
 
 MODULE_PARM_DESC (dumbkbd,"Pretend that controller can only read data from keyboard")
 
 module_param_named (noloop, i8042_noloop, bool, 0)
 
 MODULE_PARM_DESC (noloop,"Disable the AUX Loopback command while probing for the AUX port")
 
 module_param_named (notimeout, i8042_notimeout, bool, 0)
 
 MODULE_PARM_DESC (notimeout,"Ignore timeouts signalled by i8042")
 
 module_param_named (debug, i8042_debug, bool, 0600)
 
 MODULE_PARM_DESC (debug,"Turn i8042 debugging mode on and off")
 
void i8042_lock_chip (void)
 
 EXPORT_SYMBOL (i8042_lock_chip)
 
void i8042_unlock_chip (void)
 
 EXPORT_SYMBOL (i8042_unlock_chip)
 
int i8042_install_filter (bool(*filter)(unsigned char data, unsigned char str, struct serio *serio))
 
 EXPORT_SYMBOL (i8042_install_filter)
 
int i8042_remove_filter (bool(*filter)(unsigned char data, unsigned char str, struct serio *port))
 
 EXPORT_SYMBOL (i8042_remove_filter)
 
int i8042_command (unsigned char *param, int command)
 
 EXPORT_SYMBOL (i8042_command)
 
bool i8042_check_port_owner (const struct serio *port)
 
 EXPORT_SYMBOL (i8042_check_port_owner)
 
 module_init (i8042_init)
 
 module_exit (i8042_exit)
 

Macro Definition Documentation

#define DEBUG

Definition at line 82 of file i8042.c.

#define DELAY   do { mdelay(1); if (++delay > 10) return delay; } while(0)

Definition at line 1041 of file i8042.c.

#define I8042_AUX_PORT_NO   1

Definition at line 117 of file i8042.c.

#define I8042_KBD_PORT_NO   0

Definition at line 116 of file i8042.c.

#define I8042_MUX_PORT_NO   2

Definition at line 118 of file i8042.c.

#define I8042_NUM_PORTS   (I8042_NUM_MUX_PORTS + 2)

Definition at line 119 of file i8042.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 13 of file i8042.c.

Function Documentation

EXPORT_SYMBOL ( i8042_lock_chip  )
EXPORT_SYMBOL ( i8042_unlock_chip  )
EXPORT_SYMBOL ( i8042_install_filter  )
EXPORT_SYMBOL ( i8042_remove_filter  )
EXPORT_SYMBOL ( i8042_command  )
EXPORT_SYMBOL ( i8042_check_port_owner  )
bool i8042_check_port_owner ( const struct serio port)

Definition at line 1302 of file i8042.c.

int i8042_command ( unsigned char param,
int  command 
)

Definition at line 293 of file i8042.c.

int i8042_install_filter ( bool(*)(unsigned char data, unsigned char str, struct serio *serio filter)

Definition at line 147 of file i8042.c.

void i8042_lock_chip ( void  )

Definition at line 135 of file i8042.c.

int i8042_remove_filter ( bool(*)(unsigned char data, unsigned char str, struct serio *port filter)

Definition at line 168 of file i8042.c.

void i8042_unlock_chip ( void  )

Definition at line 141 of file i8042.c.

MODULE_AUTHOR ( "Vojtech Pavlik <[email protected]>"  )
MODULE_DESCRIPTION ( "i8042 keyboard and mouse controller driver )
module_exit ( i8042_exit  )
module_init ( i8042_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( nokbd  ,
i8042_nokbd  ,
bool  ,
 
)
module_param_named ( noaux  ,
i8042_noaux  ,
bool  ,
 
)
module_param_named ( nomux  ,
i8042_nomux  ,
bool  ,
 
)
module_param_named ( unlock  ,
i8042_unlock  ,
bool  ,
 
)
module_param_named ( reset  ,
i8042_reset  ,
bool  ,
 
)
module_param_named ( direct  ,
i8042_direct  ,
bool  ,
 
)
module_param_named ( dumbkbd  ,
i8042_dumbkbd  ,
bool  ,
 
)
module_param_named ( noloop  ,
i8042_noloop  ,
bool  ,
 
)
module_param_named ( notimeout  ,
i8042_notimeout  ,
bool  ,
 
)
module_param_named ( debug  ,
i8042_debug  ,
bool  ,
0600   
)
MODULE_PARM_DESC ( nokbd  ,
"Do not probe or use KBD port."   
)
MODULE_PARM_DESC ( noaux  ,
"Do not probe or use AUX (mouse) port."   
)
MODULE_PARM_DESC ( nomux  ,
"Do not check whether an active multiplexing controller is present."   
)
MODULE_PARM_DESC ( unlock  ,
"Ignore keyboard lock."   
)
MODULE_PARM_DESC ( reset  ,
"Reset controller during init and cleanup."   
)
MODULE_PARM_DESC ( direct  ,
"Put keyboard port into non-translated mode."   
)
MODULE_PARM_DESC ( dumbkbd  ,
"Pretend that controller can only read data from keyboard"   
)
MODULE_PARM_DESC ( noloop  ,
"Disable the AUX Loopback command while probing for the AUX port  
)
MODULE_PARM_DESC ( notimeout  ,
"Ignore timeouts signalled by i8042"   
)
MODULE_PARM_DESC ( debug  ,
"Turn i8042 debugging mode on and off"   
)