diff options
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/joystick/sidewinder.c | 11 | ||||
| -rw-r--r-- | drivers/input/keyboard/corgikbd.c | 12 | ||||
| -rw-r--r-- | drivers/input/keyboard/spitzkbd.c | 12 | ||||
| -rw-r--r-- | drivers/input/misc/wistron_btns.c | 19 | ||||
| -rw-r--r-- | drivers/input/mouse/alps.c | 4 | ||||
| -rw-r--r-- | drivers/input/mouse/lifebook.c | 24 | ||||
| -rw-r--r-- | drivers/input/mouse/logips2pp.c | 6 |
7 files changed, 69 insertions, 19 deletions
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index 2b2ec1057dee..95c0de7964a0 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c | |||
| @@ -589,7 +589,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
| 589 | struct sw *sw; | 589 | struct sw *sw; |
| 590 | struct input_dev *input_dev; | 590 | struct input_dev *input_dev; |
| 591 | int i, j, k, l; | 591 | int i, j, k, l; |
| 592 | int err; | 592 | int err = 0; |
| 593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ | 593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ |
| 594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ | 594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ |
| 595 | unsigned char m = 1; | 595 | unsigned char m = 1; |
| @@ -776,7 +776,10 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
| 776 | goto fail4; | 776 | goto fail4; |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | return 0; | 779 | out: kfree(buf); |
| 780 | kfree(idbuf); | ||
| 781 | |||
| 782 | return err; | ||
| 780 | 783 | ||
| 781 | fail4: input_free_device(sw->dev[i]); | 784 | fail4: input_free_device(sw->dev[i]); |
| 782 | fail3: while (--i >= 0) | 785 | fail3: while (--i >= 0) |
| @@ -784,9 +787,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
| 784 | fail2: gameport_close(gameport); | 787 | fail2: gameport_close(gameport); |
| 785 | fail1: gameport_set_drvdata(gameport, NULL); | 788 | fail1: gameport_set_drvdata(gameport, NULL); |
| 786 | kfree(sw); | 789 | kfree(sw); |
| 787 | kfree(buf); | 790 | goto out; |
| 788 | kfree(idbuf); | ||
| 789 | return err; | ||
| 790 | } | 791 | } |
| 791 | 792 | ||
| 792 | static void sw_disconnect(struct gameport *gameport) | 793 | static void sw_disconnect(struct gameport *gameport) |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 96c6bf77248a..1f0e720267d7 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
| @@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data) | |||
| 245 | if (hinge_count >= HINGE_STABLE_COUNT) { | 245 | if (hinge_count >= HINGE_STABLE_COUNT) { |
| 246 | spin_lock_irqsave(&corgikbd_data->lock, flags); | 246 | spin_lock_irqsave(&corgikbd_data->lock, flags); |
| 247 | 247 | ||
| 248 | input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); | 248 | input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); |
| 249 | input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); | 249 | input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); |
| 250 | input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); | 250 | input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); |
| 251 | input_sync(corgikbd_data->input); | 251 | input_sync(corgikbd_data->input); |
| 252 | 252 | ||
| 253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); | 253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); |
| @@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev) | |||
| 340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) | 340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) |
| 341 | set_bit(corgikbd->keycode[i], input_dev->keybit); | 341 | set_bit(corgikbd->keycode[i], input_dev->keybit); |
| 342 | clear_bit(0, input_dev->keybit); | 342 | clear_bit(0, input_dev->keybit); |
| 343 | set_bit(SW_0, input_dev->swbit); | 343 | set_bit(SW_LID, input_dev->swbit); |
| 344 | set_bit(SW_1, input_dev->swbit); | 344 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
| 345 | set_bit(SW_2, input_dev->swbit); | 345 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
| 346 | 346 | ||
| 347 | input_register_device(corgikbd->input); | 347 | input_register_device(corgikbd->input); |
| 348 | 348 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 1d238a9d52d6..c5d03fb77bcb 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
| @@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data) | |||
| 299 | if (hinge_count >= HINGE_STABLE_COUNT) { | 299 | if (hinge_count >= HINGE_STABLE_COUNT) { |
| 300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); | 300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); |
| 301 | 301 | ||
| 302 | input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); | 302 | input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); |
| 303 | input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); | 303 | input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); |
| 304 | input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); | 304 | input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); |
| 305 | input_sync(spitzkbd_data->input); | 305 | input_sync(spitzkbd_data->input); |
| 306 | 306 | ||
| 307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); | 307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); |
| @@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
| 398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) | 398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) |
| 399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); | 399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); |
| 400 | clear_bit(0, input_dev->keybit); | 400 | clear_bit(0, input_dev->keybit); |
| 401 | set_bit(SW_0, input_dev->swbit); | 401 | set_bit(SW_LID, input_dev->swbit); |
| 402 | set_bit(SW_1, input_dev->swbit); | 402 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
| 403 | set_bit(SW_2, input_dev->swbit); | 403 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
| 404 | 404 | ||
| 405 | input_register_device(input_dev); | 405 | input_register_device(input_dev); |
| 406 | 406 | ||
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 36cd2e07fce8..e4e5be111c96 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
| @@ -318,6 +318,16 @@ static struct key_entry keymap_acer_travelmate_240[] = { | |||
| 318 | { KE_END, 0 } | 318 | { KE_END, 0 } |
| 319 | }; | 319 | }; |
| 320 | 320 | ||
| 321 | static struct key_entry keymap_aopen_1559as[] = { | ||
| 322 | { KE_KEY, 0x01, KEY_HELP }, | ||
| 323 | { KE_KEY, 0x06, KEY_PROG3 }, | ||
| 324 | { KE_KEY, 0x11, KEY_PROG1 }, | ||
| 325 | { KE_KEY, 0x12, KEY_PROG2 }, | ||
| 326 | { KE_WIFI, 0x30, 0 }, | ||
| 327 | { KE_KEY, 0x31, KEY_MAIL }, | ||
| 328 | { KE_KEY, 0x36, KEY_WWW }, | ||
| 329 | }; | ||
| 330 | |||
| 321 | /* | 331 | /* |
| 322 | * If your machine is not here (which is currently rather likely), please send | 332 | * If your machine is not here (which is currently rather likely), please send |
| 323 | * a list of buttons and their key codes (reported when loading this module | 333 | * a list of buttons and their key codes (reported when loading this module |
| @@ -369,6 +379,15 @@ static struct dmi_system_id dmi_ids[] = { | |||
| 369 | }, | 379 | }, |
| 370 | .driver_data = keymap_acer_travelmate_240 | 380 | .driver_data = keymap_acer_travelmate_240 |
| 371 | }, | 381 | }, |
| 382 | { | ||
| 383 | .callback = dmi_matched, | ||
| 384 | .ident = "AOpen 1559AS", | ||
| 385 | .matches = { | ||
| 386 | DMI_MATCH(DMI_PRODUCT_NAME, "E2U"), | ||
| 387 | DMI_MATCH(DMI_BOARD_NAME, "E2U"), | ||
| 388 | }, | ||
| 389 | .driver_data = keymap_aopen_1559as | ||
| 390 | }, | ||
| 372 | { NULL, } | 391 | { NULL, } |
| 373 | }; | 392 | }; |
| 374 | 393 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 2141501e9f2e..a0e2e797c6d5 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -100,8 +100,8 @@ static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs) | |||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | if (priv->i->flags & ALPS_OLDPROTO) { | 102 | if (priv->i->flags & ALPS_OLDPROTO) { |
| 103 | left = packet[2] & 0x08; | 103 | left = packet[2] & 0x10; |
| 104 | right = packet[2] & 0x10; | 104 | right = packet[2] & 0x08; |
| 105 | middle = 0; | 105 | middle = 0; |
| 106 | x = packet[1] | ((packet[0] & 0x07) << 7); | 106 | x = packet[1] | ((packet[0] & 0x07) << 7); |
| 107 | y = packet[4] | ((packet[3] & 0x07) << 7); | 107 | y = packet[4] | ((packet[3] & 0x07) << 7); |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 5ccc3ef3b89e..c14395ba7980 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
| @@ -22,12 +22,36 @@ | |||
| 22 | 22 | ||
| 23 | static struct dmi_system_id lifebook_dmi_table[] = { | 23 | static struct dmi_system_id lifebook_dmi_table[] = { |
| 24 | { | 24 | { |
| 25 | .ident = "LifeBook B", | ||
| 26 | .matches = { | ||
| 27 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"), | ||
| 28 | }, | ||
| 29 | }, | ||
| 30 | { | ||
| 25 | .ident = "Lifebook B", | 31 | .ident = "Lifebook B", |
| 26 | .matches = { | 32 | .matches = { |
| 27 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), | 33 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), |
| 28 | }, | 34 | }, |
| 29 | }, | 35 | }, |
| 30 | { | 36 | { |
| 37 | .ident = "Lifebook B213x/B2150", | ||
| 38 | .matches = { | ||
| 39 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"), | ||
| 40 | }, | ||
| 41 | }, | ||
| 42 | { | ||
| 43 | .ident = "Zephyr", | ||
| 44 | .matches = { | ||
| 45 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"), | ||
| 46 | }, | ||
| 47 | }, | ||
| 48 | { | ||
| 49 | .ident = "CF-18", | ||
| 50 | .matches = { | ||
| 51 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), | ||
| 52 | }, | ||
| 53 | }, | ||
| 54 | { | ||
| 31 | .ident = "Lifebook B142", | 55 | .ident = "Lifebook B142", |
| 32 | .matches = { | 56 | .matches = { |
| 33 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), | 57 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), |
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 40333d61093c..2f0d28840810 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #define PS2PP_KIND_WHEEL 1 | 19 | #define PS2PP_KIND_WHEEL 1 |
| 20 | #define PS2PP_KIND_MX 2 | 20 | #define PS2PP_KIND_MX 2 |
| 21 | #define PS2PP_KIND_TP3 3 | 21 | #define PS2PP_KIND_TP3 3 |
| 22 | #define PS2PP_KIND_TRACKMAN 4 | ||
| 22 | 23 | ||
| 23 | /* Logitech mouse features */ | 24 | /* Logitech mouse features */ |
| 24 | #define PS2PP_WHEEL 0x01 | 25 | #define PS2PP_WHEEL 0x01 |
| @@ -223,6 +224,7 @@ static struct ps2pp_info *get_model_info(unsigned char model) | |||
| 223 | { 73, 0, PS2PP_SIDE_BTN }, | 224 | { 73, 0, PS2PP_SIDE_BTN }, |
| 224 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 225 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| 225 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 226 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| 227 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ | ||
| 226 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, | 228 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, |
| 227 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 229 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| 228 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 230 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| @@ -298,6 +300,10 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_inf | |||
| 298 | psmouse->name = "TouchPad 3"; | 300 | psmouse->name = "TouchPad 3"; |
| 299 | break; | 301 | break; |
| 300 | 302 | ||
| 303 | case PS2PP_KIND_TRACKMAN: | ||
| 304 | psmouse->name = "TrackMan"; | ||
| 305 | break; | ||
| 306 | |||
| 301 | default: | 307 | default: |
| 302 | /* | 308 | /* |
| 303 | * Set name to "Mouse" only when using PS2++, | 309 | * Set name to "Mouse" only when using PS2++, |
