Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
psmouse-base.c File Reference
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>
#include <linux/libps2.h>
#include <linux/mutex.h>
#include "psmouse.h"
#include "synaptics.h"
#include "logips2pp.h"
#include "alps.h"
#include "hgpk.h"
#include "lifebook.h"
#include "trackpoint.h"
#include "touchkit_ps2.h"
#include "elantech.h"
#include "sentelic.h"

Go to the source code of this file.

Data Structures

struct  psmouse_protocol
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define psmouse_fmt(fmt)   fmt
 
#define DRIVER_DESC   "PS/2 mouse driver"
 
#define param_check_proto_abbrev(name, p)   __param_check(name, p, unsigned int)
 

Functions

 MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (proto, psmouse_max_proto, proto_abbrev, 0644)
 
 MODULE_PARM_DESC (proto,"Highest protocol extension to probe (bare, imps, exps, any). Useful for KVM switches.")
 
 module_param_named (resolution, psmouse_resolution, uint, 0644)
 
 MODULE_PARM_DESC (resolution,"Resolution, in dpi.")
 
 module_param_named (rate, psmouse_rate, uint, 0644)
 
 MODULE_PARM_DESC (rate,"Report rate, in reports per second.")
 
 module_param_named (smartscroll, psmouse_smartscroll, bool, 0644)
 
 MODULE_PARM_DESC (smartscroll,"Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.")
 
 module_param_named (resetafter, psmouse_resetafter, uint, 0644)
 
 MODULE_PARM_DESC (resetafter,"Reset device after so many bad packets (0 = never).")
 
 module_param_named (resync_time, psmouse_resync_time, uint, 0644)
 
 MODULE_PARM_DESC (resync_time,"How long can mouse stay idle before forcing resync (in seconds, 0 = never).")
 
 PSMOUSE_DEFINE_ATTR (protocol, S_IWUSR|S_IRUGO, NULL, psmouse_attr_show_protocol, psmouse_attr_set_protocol)
 
 PSMOUSE_DEFINE_ATTR (rate, S_IWUSR|S_IRUGO,(void *) offsetof(struct psmouse, rate), psmouse_show_int_attr, psmouse_attr_set_rate)
 
 PSMOUSE_DEFINE_ATTR (resolution, S_IWUSR|S_IRUGO,(void *) offsetof(struct psmouse, resolution), psmouse_show_int_attr, psmouse_attr_set_resolution)
 
 PSMOUSE_DEFINE_ATTR (resetafter, S_IWUSR|S_IRUGO,(void *) offsetof(struct psmouse, resetafter), psmouse_show_int_attr, psmouse_set_int_attr)
 
 PSMOUSE_DEFINE_ATTR (resync_time, S_IWUSR|S_IRUGO,(void *) offsetof(struct psmouse, resync_time), psmouse_show_int_attr, psmouse_set_int_attr)
 
psmouse_ret_t psmouse_process_byte (struct psmouse *psmouse)
 
void psmouse_queue_work (struct psmouse *psmouse, struct delayed_work *work, unsigned long delay)
 
void psmouse_set_state (struct psmouse *psmouse, enum psmouse_state new_state)
 
int psmouse_sliced_command (struct psmouse *psmouse, unsigned char command)
 
int psmouse_reset (struct psmouse *psmouse)
 
void psmouse_set_resolution (struct psmouse *psmouse, unsigned int resolution)
 
int psmouse_activate (struct psmouse *psmouse)
 
int psmouse_deactivate (struct psmouse *psmouse)
 
 MODULE_DEVICE_TABLE (serio, psmouse_serio_ids)
 
ssize_t psmouse_attr_show_helper (struct device *dev, struct device_attribute *devattr, char *buf)
 
ssize_t psmouse_attr_set_helper (struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
 
 module_init (psmouse_init)
 
 module_exit (psmouse_exit)
 

Macro Definition Documentation

#define DRIVER_DESC   "PS/2 mouse driver"

Definition at line 38 of file psmouse-base.c.

#define param_check_proto_abbrev (   name,
  p 
)    __param_check(name, p, unsigned int)

Definition at line 51 of file psmouse-base.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 14 of file psmouse-base.c.

#define psmouse_fmt (   fmt)    fmt

Definition at line 15 of file psmouse-base.c.

Function Documentation

MODULE_AUTHOR ( "Vojtech Pavlik <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( serio  ,
psmouse_serio_ids   
)
module_exit ( psmouse_exit  )
module_init ( psmouse_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( proto  ,
psmouse_max_proto  ,
proto_abbrev  ,
0644   
)
module_param_named ( resolution  ,
psmouse_resolution  ,
uint  ,
0644   
)
module_param_named ( rate  ,
psmouse_rate  ,
uint  ,
0644   
)
module_param_named ( smartscroll  ,
psmouse_smartscroll  ,
bool  ,
0644   
)
module_param_named ( resetafter  ,
psmouse_resetafter  ,
uint  ,
0644   
)
module_param_named ( resync_time  ,
psmouse_resync_time  ,
uint  ,
0644   
)
MODULE_PARM_DESC ( proto  ,
"Highest protocol extension to probe (bare, imps, exps, any). Useful for KVM switches."   
)
MODULE_PARM_DESC ( resolution  ,
Resolution,
in dpi."   
)
MODULE_PARM_DESC ( rate  ,
"Report  rate,
in reports per second."   
)
MODULE_PARM_DESC ( smartscroll  ,
"Logitech Smartscroll  autorepeat,
= enabled (default) 
)
MODULE_PARM_DESC ( resetafter  ,
"Reset device after so many bad packets (0 = never)."   
)
MODULE_PARM_DESC ( resync_time  ,
"How long can mouse stay idle before forcing resync (in seconds, 0 = never)."   
)
int psmouse_activate ( struct psmouse psmouse)

Definition at line 1095 of file psmouse-base.c.

ssize_t psmouse_attr_set_helper ( struct device dev,
struct device_attribute devattr,
const char buf,
size_t  count 
)

Definition at line 1574 of file psmouse-base.c.

ssize_t psmouse_attr_show_helper ( struct device dev,
struct device_attribute devattr,
char buf 
)

Definition at line 1562 of file psmouse-base.c.

int psmouse_deactivate ( struct psmouse psmouse)

Definition at line 1112 of file psmouse-base.c.

PSMOUSE_DEFINE_ATTR ( protocol  ,
S_IWUSR S_IRUGO,
NULL  ,
psmouse_attr_show_protocol  ,
psmouse_attr_set_protocol   
)
PSMOUSE_DEFINE_ATTR ( rate  ,
S_IWUSR S_IRUGO,
(void *) offsetof(struct psmouse, rate ,
psmouse_show_int_attr  ,
psmouse_attr_set_rate   
)
PSMOUSE_DEFINE_ATTR ( resolution  ,
S_IWUSR S_IRUGO,
(void *) offsetof(struct psmouse, resolution)  ,
psmouse_show_int_attr  ,
psmouse_attr_set_resolution   
)
PSMOUSE_DEFINE_ATTR ( resetafter  ,
S_IWUSR S_IRUGO,
(void *) offsetof(struct psmouse, resetafter)  ,
psmouse_show_int_attr  ,
psmouse_set_int_attr   
)
PSMOUSE_DEFINE_ATTR ( resync_time  ,
S_IWUSR S_IRUGO,
(void *) offsetof(struct psmouse, resync_time)  ,
psmouse_show_int_attr  ,
psmouse_set_int_attr   
)
psmouse_ret_t psmouse_process_byte ( struct psmouse psmouse)

Definition at line 130 of file psmouse-base.c.

void psmouse_queue_work ( struct psmouse psmouse,
struct delayed_work work,
unsigned long  delay 
)

Definition at line 213 of file psmouse-base.c.

int psmouse_reset ( struct psmouse psmouse)

Definition at line 408 of file psmouse-base.c.

void psmouse_set_resolution ( struct psmouse psmouse,
unsigned int  resolution 
)

Definition at line 425 of file psmouse-base.c.

void psmouse_set_state ( struct psmouse psmouse,
enum psmouse_state  new_state 
)

Definition at line 238 of file psmouse-base.c.

int psmouse_sliced_command ( struct psmouse psmouse,
unsigned char  command 
)

Definition at line 388 of file psmouse-base.c.