Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
hid-magicmouse.c File Reference
#include <linux/device.h>
#include <linux/hid.h>
#include <linux/input/mt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include "hid-ids.h"

Go to the source code of this file.

Data Structures

struct  magicmouse_sc
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define TRACKPAD_REPORT_ID   0x28
 
#define MOUSE_REPORT_ID   0x29
 
#define DOUBLE_REPORT_ID   0xf7
 
#define TOUCH_STATE_MASK   0xf0
 
#define TOUCH_STATE_NONE   0x00
 
#define TOUCH_STATE_START   0x30
 
#define TOUCH_STATE_DRAG   0x40
 
#define SCROLL_ACCEL_DEFAULT   7
 
#define MOUSE_DIMENSION_X   (float)9056
 
#define MOUSE_MIN_X   -1100
 
#define MOUSE_MAX_X   1258
 
#define MOUSE_RES_X   ((MOUSE_MAX_X - MOUSE_MIN_X) / (MOUSE_DIMENSION_X / 100))
 
#define MOUSE_DIMENSION_Y   (float)5152
 
#define MOUSE_MIN_Y   -1589
 
#define MOUSE_MAX_Y   2047
 
#define MOUSE_RES_Y   ((MOUSE_MAX_Y - MOUSE_MIN_Y) / (MOUSE_DIMENSION_Y / 100))
 
#define TRACKPAD_DIMENSION_X   (float)13000
 
#define TRACKPAD_MIN_X   -2909
 
#define TRACKPAD_MAX_X   3167
 
#define TRACKPAD_RES_X   ((TRACKPAD_MAX_X - TRACKPAD_MIN_X) / (TRACKPAD_DIMENSION_X / 100))
 
#define TRACKPAD_DIMENSION_Y   (float)11000
 
#define TRACKPAD_MIN_Y   -2456
 
#define TRACKPAD_MAX_Y   2565
 
#define TRACKPAD_RES_Y   ((TRACKPAD_MAX_Y - TRACKPAD_MIN_Y) / (TRACKPAD_DIMENSION_Y / 100))
 

Functions

 module_param (emulate_3button, bool, 0644)
 
 MODULE_PARM_DESC (emulate_3button,"Emulate a middle button")
 
 module_param (emulate_scroll_wheel, bool, 0644)
 
 MODULE_PARM_DESC (emulate_scroll_wheel,"Emulate a scroll wheel")
 
 module_param_call (scroll_speed, param_set_scroll_speed, param_get_uint,&scroll_speed, 0644)
 
 MODULE_PARM_DESC (scroll_speed,"Scroll speed, value from 0 (slow) to 63 (fast)")
 
 module_param (scroll_acceleration, bool, 0644)
 
 MODULE_PARM_DESC (scroll_acceleration,"Accelerate sequential scroll events")
 
 module_param (report_undeciphered, bool, 0644)
 
 MODULE_PARM_DESC (report_undeciphered,"Report undeciphered multi-touch state field using a MSC_RAW event")
 
 MODULE_DEVICE_TABLE (hid, magic_mice)
 
 module_init (magicmouse_init)
 
 module_exit (magicmouse_exit)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DOUBLE_REPORT_ID   0xf7

Definition at line 58 of file hid-magicmouse.c.

#define MOUSE_DIMENSION_X   (float)9056

Definition at line 74 of file hid-magicmouse.c.

#define MOUSE_DIMENSION_Y   (float)5152

Definition at line 78 of file hid-magicmouse.c.

#define MOUSE_MAX_X   1258

Definition at line 76 of file hid-magicmouse.c.

#define MOUSE_MAX_Y   2047

Definition at line 80 of file hid-magicmouse.c.

#define MOUSE_MIN_X   -1100

Definition at line 75 of file hid-magicmouse.c.

#define MOUSE_MIN_Y   -1589

Definition at line 79 of file hid-magicmouse.c.

#define MOUSE_REPORT_ID   0x29

Definition at line 57 of file hid-magicmouse.c.

#define MOUSE_RES_X   ((MOUSE_MAX_X - MOUSE_MIN_X) / (MOUSE_DIMENSION_X / 100))

Definition at line 77 of file hid-magicmouse.c.

#define MOUSE_RES_Y   ((MOUSE_MAX_Y - MOUSE_MIN_Y) / (MOUSE_DIMENSION_Y / 100))

Definition at line 81 of file hid-magicmouse.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 15 of file hid-magicmouse.c.

#define SCROLL_ACCEL_DEFAULT   7

Definition at line 70 of file hid-magicmouse.c.

#define TOUCH_STATE_DRAG   0x40

Definition at line 68 of file hid-magicmouse.c.

#define TOUCH_STATE_MASK   0xf0

Definition at line 65 of file hid-magicmouse.c.

#define TOUCH_STATE_NONE   0x00

Definition at line 66 of file hid-magicmouse.c.

#define TOUCH_STATE_START   0x30

Definition at line 67 of file hid-magicmouse.c.

#define TRACKPAD_DIMENSION_X   (float)13000

Definition at line 83 of file hid-magicmouse.c.

#define TRACKPAD_DIMENSION_Y   (float)11000

Definition at line 88 of file hid-magicmouse.c.

#define TRACKPAD_MAX_X   3167

Definition at line 85 of file hid-magicmouse.c.

#define TRACKPAD_MAX_Y   2565

Definition at line 90 of file hid-magicmouse.c.

#define TRACKPAD_MIN_X   -2909

Definition at line 84 of file hid-magicmouse.c.

#define TRACKPAD_MIN_Y   -2456

Definition at line 89 of file hid-magicmouse.c.

#define TRACKPAD_REPORT_ID   0x28

Definition at line 56 of file hid-magicmouse.c.

#define TRACKPAD_RES_X   ((TRACKPAD_MAX_X - TRACKPAD_MIN_X) / (TRACKPAD_DIMENSION_X / 100))

Definition at line 86 of file hid-magicmouse.c.

#define TRACKPAD_RES_Y   ((TRACKPAD_MAX_Y - TRACKPAD_MIN_Y) / (TRACKPAD_DIMENSION_Y / 100))

Definition at line 91 of file hid-magicmouse.c.

Function Documentation

MODULE_DEVICE_TABLE ( hid  ,
magic_mice   
)
module_exit ( magicmouse_exit  )
module_init ( magicmouse_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( emulate_3button  ,
bool  ,
0644   
)
module_param ( emulate_scroll_wheel  ,
bool  ,
0644   
)
module_param ( scroll_acceleration  ,
bool  ,
0644   
)
module_param ( report_undeciphered  ,
bool  ,
0644   
)
module_param_call ( scroll_speed  ,
param_set_scroll_speed  ,
param_get_uint  ,
scroll_speed,
0644   
)
MODULE_PARM_DESC ( emulate_3button  ,
"Emulate a middle button  
)
MODULE_PARM_DESC ( emulate_scroll_wheel  ,
"Emulate a scroll wheel  
)
MODULE_PARM_DESC ( scroll_speed  ,
"Scroll  speed,
value from 0(slow) to 63(fast)"   
)
MODULE_PARM_DESC ( scroll_acceleration  ,
"Accelerate sequential scroll events  
)
MODULE_PARM_DESC ( report_undeciphered  ,
"Report undeciphered multi-touch state field using a MSC_RAW event  
)