diff options
Diffstat (limited to 'drivers/input/mouse/synaptics.h')
-rw-r--r-- | drivers/input/mouse/synaptics.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index ca040aa80fa..622aea8dd7e 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
@@ -74,6 +74,8 @@ | |||
74 | * 2 0x04 reduced filtering firmware does less filtering on | 74 | * 2 0x04 reduced filtering firmware does less filtering on |
75 | * position data, driver should watch | 75 | * position data, driver should watch |
76 | * for noise. | 76 | * for noise. |
77 | * 2 0x08 image sensor image sensor tracks 5 fingers, but only | ||
78 | * reports 2. | ||
77 | * 2 0x20 report min query 0x0f gives min coord reported | 79 | * 2 0x20 report min query 0x0f gives min coord reported |
78 | */ | 80 | */ |
79 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100000) /* 1-button ClickPad */ | 81 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100000) /* 1-button ClickPad */ |
@@ -82,6 +84,7 @@ | |||
82 | #define SYN_CAP_MIN_DIMENSIONS(ex0c) ((ex0c) & 0x002000) | 84 | #define SYN_CAP_MIN_DIMENSIONS(ex0c) ((ex0c) & 0x002000) |
83 | #define SYN_CAP_ADV_GESTURE(ex0c) ((ex0c) & 0x080000) | 85 | #define SYN_CAP_ADV_GESTURE(ex0c) ((ex0c) & 0x080000) |
84 | #define SYN_CAP_REDUCED_FILTERING(ex0c) ((ex0c) & 0x000400) | 86 | #define SYN_CAP_REDUCED_FILTERING(ex0c) ((ex0c) & 0x000400) |
87 | #define SYN_CAP_IMAGE_SENSOR(ex0c) ((ex0c) & 0x000800) | ||
85 | 88 | ||
86 | /* synaptics modes query bits */ | 89 | /* synaptics modes query bits */ |
87 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) | 90 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) |
@@ -112,9 +115,18 @@ | |||
112 | #define SYN_REDUCED_FILTER_FUZZ 8 | 115 | #define SYN_REDUCED_FILTER_FUZZ 8 |
113 | 116 | ||
114 | /* | 117 | /* |
115 | * A structure to describe the state of the touchpad hardware (buttons and pad) | 118 | * A structure to describe which internal touchpad finger slots are being |
119 | * reported in raw packets. | ||
116 | */ | 120 | */ |
121 | struct synaptics_mt_state { | ||
122 | int count; /* num fingers being tracked */ | ||
123 | int sgm; /* which slot is reported by sgm pkt */ | ||
124 | int agm; /* which slot is reported by agm pkt*/ | ||
125 | }; | ||
117 | 126 | ||
127 | /* | ||
128 | * A structure to describe the state of the touchpad hardware (buttons and pad) | ||
129 | */ | ||
118 | struct synaptics_hw_state { | 130 | struct synaptics_hw_state { |
119 | int x; | 131 | int x; |
120 | int y; | 132 | int y; |
@@ -127,6 +139,9 @@ struct synaptics_hw_state { | |||
127 | unsigned int down:1; | 139 | unsigned int down:1; |
128 | unsigned char ext_buttons; | 140 | unsigned char ext_buttons; |
129 | signed char scroll; | 141 | signed char scroll; |
142 | |||
143 | /* As reported in last AGM-CONTACT packets */ | ||
144 | struct synaptics_mt_state mt_state; | ||
130 | }; | 145 | }; |
131 | 146 | ||
132 | struct synaptics_data { | 147 | struct synaptics_data { |
@@ -146,7 +161,15 @@ struct synaptics_data { | |||
146 | 161 | ||
147 | struct serio *pt_port; /* Pass-through serio port */ | 162 | struct serio *pt_port; /* Pass-through serio port */ |
148 | 163 | ||
149 | struct synaptics_hw_state mt; /* current gesture packet */ | 164 | struct synaptics_mt_state mt_state; /* Current mt finger state */ |
165 | bool mt_state_lost; /* mt_state may be incorrect */ | ||
166 | |||
167 | /* | ||
168 | * Last received Advanced Gesture Mode (AGM) packet. An AGM packet | ||
169 | * contains position data for a second contact, at half resolution. | ||
170 | */ | ||
171 | struct synaptics_hw_state agm; | ||
172 | bool agm_pending; /* new AGM packet received */ | ||
150 | }; | 173 | }; |
151 | 174 | ||
152 | void synaptics_module_init(void); | 175 | void synaptics_module_init(void); |