aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-17 01:12:21 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-20 03:52:12 -0500
commit0cc1770b66ddc2524ab5f0ed6ba5f2df19d6414a (patch)
tree0860666d3e4b59f64d8ee96f1da78eca200add98
parentc7a1f3ccfc2f99427f2e1545b3171e98539c3c95 (diff)
Input: lifebook - do not advertise unsupported buttons
The main input device of Lifebook touchscreens does not generate left/right/middle button events and therefore should not be advertising them in its capabilities. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/mouse/lifebook.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c
index 5e6308694408..4c254876609f 100644
--- a/drivers/input/mouse/lifebook.c
+++ b/drivers/input/mouse/lifebook.c
@@ -199,10 +199,10 @@ static int lifebook_absolute_mode(struct psmouse *psmouse)
199 return -1; 199 return -1;
200 200
201 /* 201 /*
202 Enable absolute output -- ps2_command fails always but if 202 * Enable absolute output -- ps2_command fails always but if
203 you leave this call out the touchsreen will never send 203 * you leave this call out the touchsreen will never send
204 absolute coordinates 204 * absolute coordinates
205 */ 205 */
206 param = lifebook_use_6byte_proto ? 0x08 : 0x07; 206 param = lifebook_use_6byte_proto ? 0x08 : 0x07;
207 ps2_command(ps2dev, &param, PSMOUSE_CMD_SETRES); 207 ps2_command(ps2dev, &param, PSMOUSE_CMD_SETRES);
208 208
@@ -284,8 +284,8 @@ static int lifebook_create_relative_device(struct psmouse *psmouse)
284 284
285 dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); 285 dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
286 dev2->relbit[BIT_WORD(REL_X)] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); 286 dev2->relbit[BIT_WORD(REL_X)] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
287 dev2->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | 287 dev2->keybit[BIT_WORD(BTN_LEFT)] =
288 BIT_MASK(BTN_RIGHT); 288 BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT);
289 289
290 error = input_register_device(priv->dev2); 290 error = input_register_device(priv->dev2);
291 if (error) 291 if (error)
@@ -310,6 +310,7 @@ int lifebook_init(struct psmouse *psmouse)
310 310
311 dev1->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); 311 dev1->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
312 dev1->relbit[0] = 0; 312 dev1->relbit[0] = 0;
313 dev1->keybit[BIT_WORD(BTN_MOUSE)] = 0;
313 dev1->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); 314 dev1->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
314 input_set_abs_params(dev1, ABS_X, 0, max_coord, 0, 0); 315 input_set_abs_params(dev1, ABS_X, 0, max_coord, 0, 0);
315 input_set_abs_params(dev1, ABS_Y, 0, max_coord, 0, 0); 316 input_set_abs_params(dev1, ABS_Y, 0, max_coord, 0, 0);