diff options
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 42a9f7f6f8cb..5c9cd4a84a1c 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -61,11 +61,11 @@ static struct alps_model_info alps_model_data[] = { | |||
61 | 61 | ||
62 | /* | 62 | /* |
63 | * ALPS abolute Mode - new format | 63 | * ALPS abolute Mode - new format |
64 | * | 64 | * |
65 | * byte 0: 1 ? ? ? 1 ? ? ? | 65 | * byte 0: 1 ? ? ? 1 ? ? ? |
66 | * byte 1: 0 x6 x5 x4 x3 x2 x1 x0 | 66 | * byte 1: 0 x6 x5 x4 x3 x2 x1 x0 |
67 | * byte 2: 0 x10 x9 x8 x7 ? fin ges | 67 | * byte 2: 0 x10 x9 x8 x7 ? fin ges |
68 | * byte 3: 0 y9 y8 y7 1 M R L | 68 | * byte 3: 0 y9 y8 y7 1 M R L |
69 | * byte 4: 0 y6 y5 y4 y3 y2 y1 y0 | 69 | * byte 4: 0 y6 y5 y4 y3 y2 y1 y0 |
70 | * byte 5: 0 z6 z5 z4 z3 z2 z1 z0 | 70 | * byte 5: 0 z6 z5 z4 z3 z2 z1 z0 |
71 | * | 71 | * |
@@ -85,7 +85,7 @@ static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs) | |||
85 | input_regs(dev, regs); | 85 | input_regs(dev, regs); |
86 | 86 | ||
87 | if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */ | 87 | if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */ |
88 | input_report_key(dev2, BTN_LEFT, packet[0] & 1); | 88 | input_report_key(dev2, BTN_LEFT, packet[0] & 1); |
89 | input_report_key(dev2, BTN_RIGHT, packet[0] & 2); | 89 | input_report_key(dev2, BTN_RIGHT, packet[0] & 2); |
90 | input_report_key(dev2, BTN_MIDDLE, packet[0] & 4); | 90 | input_report_key(dev2, BTN_MIDDLE, packet[0] & 4); |
91 | input_report_rel(dev2, REL_X, | 91 | input_report_rel(dev2, REL_X, |
@@ -436,8 +436,8 @@ int alps_init(struct psmouse *psmouse) | |||
436 | priv->dev2.id.bustype = BUS_I8042; | 436 | priv->dev2.id.bustype = BUS_I8042; |
437 | priv->dev2.id.vendor = 0x0002; | 437 | priv->dev2.id.vendor = 0x0002; |
438 | priv->dev2.id.product = PSMOUSE_ALPS; | 438 | priv->dev2.id.product = PSMOUSE_ALPS; |
439 | priv->dev2.id.version = 0x0000; | 439 | priv->dev2.id.version = 0x0000; |
440 | 440 | ||
441 | priv->dev2.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 441 | priv->dev2.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); |
442 | priv->dev2.relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y); | 442 | priv->dev2.relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y); |
443 | priv->dev2.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 443 | priv->dev2.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); |
@@ -461,17 +461,15 @@ init_fail: | |||
461 | int alps_detect(struct psmouse *psmouse, int set_properties) | 461 | int alps_detect(struct psmouse *psmouse, int set_properties) |
462 | { | 462 | { |
463 | int version; | 463 | int version; |
464 | struct alps_model_info *model; | 464 | struct alps_model_info *model; |
465 | 465 | ||
466 | if (!(model = alps_get_model(psmouse, &version))) | 466 | if (!(model = alps_get_model(psmouse, &version))) |
467 | return -1; | 467 | return -1; |
468 | 468 | ||
469 | if (set_properties) { | 469 | if (set_properties) { |
470 | psmouse->vendor = "ALPS"; | 470 | psmouse->vendor = "ALPS"; |
471 | if (model->flags & ALPS_DUALPOINT) | 471 | psmouse->name = model->flags & ALPS_DUALPOINT ? |
472 | psmouse->name = "DualPoint TouchPad"; | 472 | "DualPoint TouchPad" : "GlidePoint"; |
473 | else | ||
474 | psmouse->name = "GlidePoint"; | ||
475 | psmouse->model = version; | 473 | psmouse->model = version; |
476 | } | 474 | } |
477 | return 0; | 475 | return 0; |