aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/synaptics.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r--drivers/input/mouse/synaptics.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index c703d53be3a..d5b390f75c9 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -139,6 +139,35 @@ static int synaptics_model_id(struct psmouse *psmouse)
139} 139}
140 140
141/* 141/*
142 * Read the board id from the touchpad
143 * The board id is encoded in the "QUERY MODES" response
144 */
145static int synaptics_board_id(struct psmouse *psmouse)
146{
147 struct synaptics_data *priv = psmouse->private;
148 unsigned char bid[3];
149
150 if (synaptics_send_cmd(psmouse, SYN_QUE_MODES, bid))
151 return -1;
152 priv->board_id = ((bid[0] & 0xfc) << 6) | bid[1];
153 return 0;
154}
155
156/*
157 * Read the firmware id from the touchpad
158 */
159static int synaptics_firmware_id(struct psmouse *psmouse)
160{
161 struct synaptics_data *priv = psmouse->private;
162 unsigned char fwid[3];
163
164 if (synaptics_send_cmd(psmouse, SYN_QUE_FIRMWARE_ID, fwid))
165 return -1;
166 priv->firmware_id = (fwid[0] << 16) | (fwid[1] << 8) | fwid[2];
167 return 0;
168}
169
170/*
142 * Read the capability-bits from the touchpad 171 * Read the capability-bits from the touchpad
143 * see also the SYN_CAP_* macros 172 * see also the SYN_CAP_* macros
144 */ 173 */
@@ -261,6 +290,10 @@ static int synaptics_query_hardware(struct psmouse *psmouse)
261 return -1; 290 return -1;
262 if (synaptics_model_id(psmouse)) 291 if (synaptics_model_id(psmouse))
263 return -1; 292 return -1;
293 if (synaptics_firmware_id(psmouse))
294 return -1;
295 if (synaptics_board_id(psmouse))
296 return -1;
264 if (synaptics_capability(psmouse)) 297 if (synaptics_capability(psmouse))
265 return -1; 298 return -1;
266 if (synaptics_resolution(psmouse)) 299 if (synaptics_resolution(psmouse))
@@ -1435,11 +1468,12 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)
1435 priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; 1468 priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS;
1436 1469
1437 psmouse_info(psmouse, 1470 psmouse_info(psmouse,
1438 "Touchpad model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx/%#lx\n", 1471 "Touchpad model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx/%#lx, board id: %lu, fw id: %lu\n",
1439 SYN_ID_MODEL(priv->identity), 1472 SYN_ID_MODEL(priv->identity),
1440 SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), 1473 SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity),
1441 priv->model_id, 1474 priv->model_id,
1442 priv->capabilities, priv->ext_cap, priv->ext_cap_0c); 1475 priv->capabilities, priv->ext_cap, priv->ext_cap_0c,
1476 priv->board_id, priv->firmware_id);
1443 1477
1444 set_input_params(psmouse->dev, priv); 1478 set_input_params(psmouse->dev, priv);
1445 1479