diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 65 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 96 | ||||
-rw-r--r-- | drivers/input/keyboard/hilkbd.c | 1 | ||||
-rw-r--r-- | drivers/input/keyboard/sunkbd.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/rotary_encoder.c | 4 | ||||
-rw-r--r-- | drivers/input/misc/sparcspkr.c | 4 | ||||
-rw-r--r-- | drivers/input/misc/wistron_btns.c | 9 | ||||
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 10 | ||||
-rw-r--r-- | drivers/input/serio/Kconfig | 13 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 13 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 3 | ||||
-rw-r--r-- | drivers/input/serio/libps2.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/serio_raw.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/serport.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/ad7879.c | 4 |
18 files changed, 159 insertions, 73 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index c6f88ebb40c7..cc763c96fada 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -782,10 +782,29 @@ static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) | |||
782 | return 0; | 782 | return 0; |
783 | } | 783 | } |
784 | 784 | ||
785 | union input_seq_state { | ||
786 | struct { | ||
787 | unsigned short pos; | ||
788 | bool mutex_acquired; | ||
789 | }; | ||
790 | void *p; | ||
791 | }; | ||
792 | |||
785 | static void *input_devices_seq_start(struct seq_file *seq, loff_t *pos) | 793 | static void *input_devices_seq_start(struct seq_file *seq, loff_t *pos) |
786 | { | 794 | { |
787 | if (mutex_lock_interruptible(&input_mutex)) | 795 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
788 | return NULL; | 796 | int error; |
797 | |||
798 | /* We need to fit into seq->private pointer */ | ||
799 | BUILD_BUG_ON(sizeof(union input_seq_state) != sizeof(seq->private)); | ||
800 | |||
801 | error = mutex_lock_interruptible(&input_mutex); | ||
802 | if (error) { | ||
803 | state->mutex_acquired = false; | ||
804 | return ERR_PTR(error); | ||
805 | } | ||
806 | |||
807 | state->mutex_acquired = true; | ||
789 | 808 | ||
790 | return seq_list_start(&input_dev_list, *pos); | 809 | return seq_list_start(&input_dev_list, *pos); |
791 | } | 810 | } |
@@ -795,9 +814,12 @@ static void *input_devices_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
795 | return seq_list_next(v, &input_dev_list, pos); | 814 | return seq_list_next(v, &input_dev_list, pos); |
796 | } | 815 | } |
797 | 816 | ||
798 | static void input_devices_seq_stop(struct seq_file *seq, void *v) | 817 | static void input_seq_stop(struct seq_file *seq, void *v) |
799 | { | 818 | { |
800 | mutex_unlock(&input_mutex); | 819 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
820 | |||
821 | if (state->mutex_acquired) | ||
822 | mutex_unlock(&input_mutex); | ||
801 | } | 823 | } |
802 | 824 | ||
803 | static void input_seq_print_bitmap(struct seq_file *seq, const char *name, | 825 | static void input_seq_print_bitmap(struct seq_file *seq, const char *name, |
@@ -861,7 +883,7 @@ static int input_devices_seq_show(struct seq_file *seq, void *v) | |||
861 | static const struct seq_operations input_devices_seq_ops = { | 883 | static const struct seq_operations input_devices_seq_ops = { |
862 | .start = input_devices_seq_start, | 884 | .start = input_devices_seq_start, |
863 | .next = input_devices_seq_next, | 885 | .next = input_devices_seq_next, |
864 | .stop = input_devices_seq_stop, | 886 | .stop = input_seq_stop, |
865 | .show = input_devices_seq_show, | 887 | .show = input_devices_seq_show, |
866 | }; | 888 | }; |
867 | 889 | ||
@@ -881,40 +903,49 @@ static const struct file_operations input_devices_fileops = { | |||
881 | 903 | ||
882 | static void *input_handlers_seq_start(struct seq_file *seq, loff_t *pos) | 904 | static void *input_handlers_seq_start(struct seq_file *seq, loff_t *pos) |
883 | { | 905 | { |
884 | if (mutex_lock_interruptible(&input_mutex)) | 906 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
885 | return NULL; | 907 | int error; |
908 | |||
909 | /* We need to fit into seq->private pointer */ | ||
910 | BUILD_BUG_ON(sizeof(union input_seq_state) != sizeof(seq->private)); | ||
911 | |||
912 | error = mutex_lock_interruptible(&input_mutex); | ||
913 | if (error) { | ||
914 | state->mutex_acquired = false; | ||
915 | return ERR_PTR(error); | ||
916 | } | ||
917 | |||
918 | state->mutex_acquired = true; | ||
919 | state->pos = *pos; | ||
886 | 920 | ||
887 | seq->private = (void *)(unsigned long)*pos; | ||
888 | return seq_list_start(&input_handler_list, *pos); | 921 | return seq_list_start(&input_handler_list, *pos); |
889 | } | 922 | } |
890 | 923 | ||
891 | static void *input_handlers_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 924 | static void *input_handlers_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
892 | { | 925 | { |
893 | seq->private = (void *)(unsigned long)(*pos + 1); | 926 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
894 | return seq_list_next(v, &input_handler_list, pos); | ||
895 | } | ||
896 | 927 | ||
897 | static void input_handlers_seq_stop(struct seq_file *seq, void *v) | 928 | state->pos = *pos + 1; |
898 | { | 929 | return seq_list_next(v, &input_handler_list, pos); |
899 | mutex_unlock(&input_mutex); | ||
900 | } | 930 | } |
901 | 931 | ||
902 | static int input_handlers_seq_show(struct seq_file *seq, void *v) | 932 | static int input_handlers_seq_show(struct seq_file *seq, void *v) |
903 | { | 933 | { |
904 | struct input_handler *handler = container_of(v, struct input_handler, node); | 934 | struct input_handler *handler = container_of(v, struct input_handler, node); |
935 | union input_seq_state *state = (union input_seq_state *)&seq->private; | ||
905 | 936 | ||
906 | seq_printf(seq, "N: Number=%ld Name=%s", | 937 | seq_printf(seq, "N: Number=%u Name=%s", state->pos, handler->name); |
907 | (unsigned long)seq->private, handler->name); | ||
908 | if (handler->fops) | 938 | if (handler->fops) |
909 | seq_printf(seq, " Minor=%d", handler->minor); | 939 | seq_printf(seq, " Minor=%d", handler->minor); |
910 | seq_putc(seq, '\n'); | 940 | seq_putc(seq, '\n'); |
911 | 941 | ||
912 | return 0; | 942 | return 0; |
913 | } | 943 | } |
944 | |||
914 | static const struct seq_operations input_handlers_seq_ops = { | 945 | static const struct seq_operations input_handlers_seq_ops = { |
915 | .start = input_handlers_seq_start, | 946 | .start = input_handlers_seq_start, |
916 | .next = input_handlers_seq_next, | 947 | .next = input_handlers_seq_next, |
917 | .stop = input_handlers_seq_stop, | 948 | .stop = input_seq_stop, |
918 | .show = input_handlers_seq_show, | 949 | .show = input_handlers_seq_show, |
919 | }; | 950 | }; |
920 | 951 | ||
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2388cf578a62..79e3edcced1a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -143,6 +143,7 @@ static const struct xpad_device { | |||
143 | { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, | 143 | { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, |
144 | { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, | 144 | { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, |
145 | { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, | 145 | { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, |
146 | { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, | ||
146 | { 0x045e, 0x028e, "Microsoft X-Box 360 pad", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, | 147 | { 0x045e, 0x028e, "Microsoft X-Box 360 pad", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, |
147 | { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, | 148 | { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, |
148 | { 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, | 149 | { 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, |
@@ -209,6 +210,7 @@ static struct usb_device_id xpad_table [] = { | |||
209 | XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */ | 210 | XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */ |
210 | XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */ | 211 | XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */ |
211 | XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */ | 212 | XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */ |
213 | XPAD_XBOX360_VENDOR(0x146b), /* BigBen Interactive Controllers */ | ||
212 | XPAD_XBOX360_VENDOR(0x1bad), /* Rock Band Drums */ | 214 | XPAD_XBOX360_VENDOR(0x1bad), /* Rock Band Drums */ |
213 | { } | 215 | { } |
214 | }; | 216 | }; |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4709e15af607..a6512372c7a3 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -574,11 +574,22 @@ static void atkbd_event_work(struct work_struct *work) | |||
574 | 574 | ||
575 | mutex_lock(&atkbd->event_mutex); | 575 | mutex_lock(&atkbd->event_mutex); |
576 | 576 | ||
577 | if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) | 577 | if (!atkbd->enabled) { |
578 | atkbd_set_leds(atkbd); | 578 | /* |
579 | * Serio ports are resumed asynchronously so while driver core | ||
580 | * thinks that device is already fully operational in reality | ||
581 | * it may not be ready yet. In this case we need to keep | ||
582 | * rescheduling till reconnect completes. | ||
583 | */ | ||
584 | schedule_delayed_work(&atkbd->event_work, | ||
585 | msecs_to_jiffies(100)); | ||
586 | } else { | ||
587 | if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) | ||
588 | atkbd_set_leds(atkbd); | ||
579 | 589 | ||
580 | if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) | 590 | if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) |
581 | atkbd_set_repeat_rate(atkbd); | 591 | atkbd_set_repeat_rate(atkbd); |
592 | } | ||
582 | 593 | ||
583 | mutex_unlock(&atkbd->event_mutex); | 594 | mutex_unlock(&atkbd->event_mutex); |
584 | } | 595 | } |
@@ -770,6 +781,30 @@ static int atkbd_select_set(struct atkbd *atkbd, int target_set, int allow_extra | |||
770 | return 3; | 781 | return 3; |
771 | } | 782 | } |
772 | 783 | ||
784 | static int atkbd_reset_state(struct atkbd *atkbd) | ||
785 | { | ||
786 | struct ps2dev *ps2dev = &atkbd->ps2dev; | ||
787 | unsigned char param[1]; | ||
788 | |||
789 | /* | ||
790 | * Set the LEDs to a predefined state (all off). | ||
791 | */ | ||
792 | |||
793 | param[0] = 0; | ||
794 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS)) | ||
795 | return -1; | ||
796 | |||
797 | /* | ||
798 | * Set autorepeat to fastest possible. | ||
799 | */ | ||
800 | |||
801 | param[0] = 0; | ||
802 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETREP)) | ||
803 | return -1; | ||
804 | |||
805 | return 0; | ||
806 | } | ||
807 | |||
773 | static int atkbd_activate(struct atkbd *atkbd) | 808 | static int atkbd_activate(struct atkbd *atkbd) |
774 | { | 809 | { |
775 | struct ps2dev *ps2dev = &atkbd->ps2dev; | 810 | struct ps2dev *ps2dev = &atkbd->ps2dev; |
@@ -852,29 +887,6 @@ static unsigned int atkbd_hp_forced_release_keys[] = { | |||
852 | }; | 887 | }; |
853 | 888 | ||
854 | /* | 889 | /* |
855 | * Inventec system with broken key release on volume keys | ||
856 | */ | ||
857 | static unsigned int atkbd_inventec_forced_release_keys[] = { | ||
858 | 0xae, 0xb0, -1U | ||
859 | }; | ||
860 | |||
861 | /* | ||
862 | * Perform fixup for HP Pavilion ZV6100 laptop that doesn't generate release | ||
863 | * for its volume buttons | ||
864 | */ | ||
865 | static unsigned int atkbd_hp_zv6100_forced_release_keys[] = { | ||
866 | 0xae, 0xb0, -1U | ||
867 | }; | ||
868 | |||
869 | /* | ||
870 | * Perform fixup for HP (Compaq) Presario R4000 R4100 R4200 that don't generate | ||
871 | * release for their volume buttons | ||
872 | */ | ||
873 | static unsigned int atkbd_hp_r4000_forced_release_keys[] = { | ||
874 | 0xae, 0xb0, -1U | ||
875 | }; | ||
876 | |||
877 | /* | ||
878 | * Samsung NC10,NC20 with Fn+F? key release not working | 890 | * Samsung NC10,NC20 with Fn+F? key release not working |
879 | */ | 891 | */ |
880 | static unsigned int atkbd_samsung_forced_release_keys[] = { | 892 | static unsigned int atkbd_samsung_forced_release_keys[] = { |
@@ -882,14 +894,6 @@ static unsigned int atkbd_samsung_forced_release_keys[] = { | |||
882 | }; | 894 | }; |
883 | 895 | ||
884 | /* | 896 | /* |
885 | * The volume up and volume down special keys on a Fujitsu Amilo PA 1510 laptop | ||
886 | * do not generate release events so we have to do it ourselves. | ||
887 | */ | ||
888 | static unsigned int atkbd_amilo_pa1510_forced_release_keys[] = { | ||
889 | 0xb0, 0xae, -1U | ||
890 | }; | ||
891 | |||
892 | /* | ||
893 | * Amilo Pi 3525 key release for Fn+Volume keys not working | 897 | * Amilo Pi 3525 key release for Fn+Volume keys not working |
894 | */ | 898 | */ |
895 | static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = { | 899 | static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = { |
@@ -911,6 +915,14 @@ static unsigned int atkdb_soltech_ta12_forced_release_keys[] = { | |||
911 | }; | 915 | }; |
912 | 916 | ||
913 | /* | 917 | /* |
918 | * Many notebooks don't send key release event for volume up/down | ||
919 | * keys, with key list below common among them | ||
920 | */ | ||
921 | static unsigned int atkbd_volume_forced_release_keys[] = { | ||
922 | 0xae, 0xb0, -1U | ||
923 | }; | ||
924 | |||
925 | /* | ||
914 | * atkbd_set_keycode_table() initializes keyboard's keycode table | 926 | * atkbd_set_keycode_table() initializes keyboard's keycode table |
915 | * according to the selected scancode set | 927 | * according to the selected scancode set |
916 | */ | 928 | */ |
@@ -1087,6 +1099,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
1087 | } | 1099 | } |
1088 | 1100 | ||
1089 | atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra); | 1101 | atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra); |
1102 | atkbd_reset_state(atkbd); | ||
1090 | atkbd_activate(atkbd); | 1103 | atkbd_activate(atkbd); |
1091 | 1104 | ||
1092 | } else { | 1105 | } else { |
@@ -1267,6 +1280,7 @@ static ssize_t atkbd_set_extra(struct atkbd *atkbd, const char *buf, size_t coun | |||
1267 | 1280 | ||
1268 | atkbd->dev = new_dev; | 1281 | atkbd->dev = new_dev; |
1269 | atkbd->set = atkbd_select_set(atkbd, atkbd->set, value); | 1282 | atkbd->set = atkbd_select_set(atkbd, atkbd->set, value); |
1283 | atkbd_reset_state(atkbd); | ||
1270 | atkbd_activate(atkbd); | 1284 | atkbd_activate(atkbd); |
1271 | atkbd_set_keycode_table(atkbd); | 1285 | atkbd_set_keycode_table(atkbd); |
1272 | atkbd_set_device_attrs(atkbd); | 1286 | atkbd_set_device_attrs(atkbd); |
@@ -1548,7 +1562,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1548 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion ZV6100"), | 1562 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion ZV6100"), |
1549 | }, | 1563 | }, |
1550 | .callback = atkbd_setup_forced_release, | 1564 | .callback = atkbd_setup_forced_release, |
1551 | .driver_data = atkbd_hp_zv6100_forced_release_keys, | 1565 | .driver_data = atkbd_volume_forced_release_keys, |
1552 | }, | 1566 | }, |
1553 | { | 1567 | { |
1554 | .ident = "HP Presario R4000", | 1568 | .ident = "HP Presario R4000", |
@@ -1557,7 +1571,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1557 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"), | 1571 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"), |
1558 | }, | 1572 | }, |
1559 | .callback = atkbd_setup_forced_release, | 1573 | .callback = atkbd_setup_forced_release, |
1560 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1574 | .driver_data = atkbd_volume_forced_release_keys, |
1561 | }, | 1575 | }, |
1562 | { | 1576 | { |
1563 | .ident = "HP Presario R4100", | 1577 | .ident = "HP Presario R4100", |
@@ -1566,7 +1580,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1566 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"), | 1580 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"), |
1567 | }, | 1581 | }, |
1568 | .callback = atkbd_setup_forced_release, | 1582 | .callback = atkbd_setup_forced_release, |
1569 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1583 | .driver_data = atkbd_volume_forced_release_keys, |
1570 | }, | 1584 | }, |
1571 | { | 1585 | { |
1572 | .ident = "HP Presario R4200", | 1586 | .ident = "HP Presario R4200", |
@@ -1575,7 +1589,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1575 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"), | 1589 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"), |
1576 | }, | 1590 | }, |
1577 | .callback = atkbd_setup_forced_release, | 1591 | .callback = atkbd_setup_forced_release, |
1578 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1592 | .driver_data = atkbd_volume_forced_release_keys, |
1579 | }, | 1593 | }, |
1580 | { | 1594 | { |
1581 | .ident = "Inventec Symphony", | 1595 | .ident = "Inventec Symphony", |
@@ -1584,7 +1598,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1584 | DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"), | 1598 | DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"), |
1585 | }, | 1599 | }, |
1586 | .callback = atkbd_setup_forced_release, | 1600 | .callback = atkbd_setup_forced_release, |
1587 | .driver_data = atkbd_inventec_forced_release_keys, | 1601 | .driver_data = atkbd_volume_forced_release_keys, |
1588 | }, | 1602 | }, |
1589 | { | 1603 | { |
1590 | .ident = "Samsung NC10", | 1604 | .ident = "Samsung NC10", |
@@ -1620,7 +1634,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1620 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 1510"), | 1634 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 1510"), |
1621 | }, | 1635 | }, |
1622 | .callback = atkbd_setup_forced_release, | 1636 | .callback = atkbd_setup_forced_release, |
1623 | .driver_data = atkbd_amilo_pa1510_forced_release_keys, | 1637 | .driver_data = atkbd_volume_forced_release_keys, |
1624 | }, | 1638 | }, |
1625 | { | 1639 | { |
1626 | .ident = "Fujitsu Amilo Pi 3525", | 1640 | .ident = "Fujitsu Amilo Pi 3525", |
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index e9d639ec283d..5f72440b50c8 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/hil.h> | 25 | #include <linux/hil.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/sched.h> | ||
27 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
29 | #ifdef CONFIG_HP300 | 30 | #ifdef CONFIG_HP300 |
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 472b56639cdb..a99a04b03ee4 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/sched.h> | ||
30 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 216a559f55ea..ea821b546969 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -209,7 +209,7 @@ static inline int hp_sdc_rtc_read_rt(struct timeval *res) { | |||
209 | 209 | ||
210 | /* Read the i8042 fast handshake timer */ | 210 | /* Read the i8042 fast handshake timer */ |
211 | static inline int hp_sdc_rtc_read_fhs(struct timeval *res) { | 211 | static inline int hp_sdc_rtc_read_fhs(struct timeval *res) { |
212 | uint64_t raw; | 212 | int64_t raw; |
213 | unsigned int tenms; | 213 | unsigned int tenms; |
214 | 214 | ||
215 | raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2); | 215 | raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2); |
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index c806fbf1e174..3b9f588fc747 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c | |||
@@ -106,8 +106,8 @@ static int __devinit rotary_encoder_probe(struct platform_device *pdev) | |||
106 | struct input_dev *input; | 106 | struct input_dev *input; |
107 | int err; | 107 | int err; |
108 | 108 | ||
109 | if (!pdata || !pdata->steps) { | 109 | if (!pdata) { |
110 | dev_err(&pdev->dev, "invalid platform data\n"); | 110 | dev_err(&pdev->dev, "missing platform data\n"); |
111 | return -ENOENT; | 111 | return -ENOENT; |
112 | } | 112 | } |
113 | 113 | ||
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index c4f42311fdec..b064419b90a2 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -230,7 +230,7 @@ out_err: | |||
230 | return err; | 230 | return err; |
231 | } | 231 | } |
232 | 232 | ||
233 | static int bbc_remove(struct of_device *op) | 233 | static int __devexit bbc_remove(struct of_device *op) |
234 | { | 234 | { |
235 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); | 235 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); |
236 | struct input_dev *input_dev = state->input_dev; | 236 | struct input_dev *input_dev = state->input_dev; |
@@ -308,7 +308,7 @@ out_err: | |||
308 | return err; | 308 | return err; |
309 | } | 309 | } |
310 | 310 | ||
311 | static int grover_remove(struct of_device *op) | 311 | static int __devexit grover_remove(struct of_device *op) |
312 | { | 312 | { |
313 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); | 313 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); |
314 | struct grover_beep_info *info = &state->u.grover; | 314 | struct grover_beep_info *info = &state->u.grover; |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 11fd038a078f..a932179c4c9e 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -936,6 +936,15 @@ static struct dmi_system_id dmi_ids[] __initdata = { | |||
936 | }, | 936 | }, |
937 | { | 937 | { |
938 | .callback = dmi_matched, | 938 | .callback = dmi_matched, |
939 | .ident = "Medion MD 42200", | ||
940 | .matches = { | ||
941 | DMI_MATCH(DMI_SYS_VENDOR, "Medion"), | ||
942 | DMI_MATCH(DMI_PRODUCT_NAME, "WIM 2030"), | ||
943 | }, | ||
944 | .driver_data = keymap_fs_amilo_pro_v2000 | ||
945 | }, | ||
946 | { | ||
947 | .callback = dmi_matched, | ||
939 | .ident = "Medion MD 96500", | 948 | .ident = "Medion MD 96500", |
940 | .matches = { | 949 | .matches = { |
941 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIONPC"), | 950 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIONPC"), |
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index de745d751162..ab5dc5f5fd83 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -219,7 +219,7 @@ static const struct ps2pp_info *get_model_info(unsigned char model) | |||
219 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | | 219 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | |
220 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, | 220 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, |
221 | { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ | 221 | { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ |
222 | { 73, 0, PS2PP_SIDE_BTN }, | 222 | { 73, PS2PP_KIND_TRACKMAN, PS2PP_SIDE_BTN }, /* TrackMan FX */ |
223 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 223 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
224 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 224 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
225 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ | 225 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index b66ff1ac7dea..f4a61252bcc9 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -652,6 +652,16 @@ static const struct dmi_system_id toshiba_dmi_table[] = { | |||
652 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 652 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
653 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), | 653 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), |
654 | }, | 654 | }, |
655 | |||
656 | }, | ||
657 | { | ||
658 | .ident = "Toshiba Portege M300", | ||
659 | .matches = { | ||
660 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
661 | DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), | ||
662 | DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"), | ||
663 | }, | ||
664 | |||
655 | }, | 665 | }, |
656 | { } | 666 | { } |
657 | }; | 667 | }; |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index c4b3fbd1a80f..aa533ceffe34 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | config SERIO | 4 | config SERIO |
5 | tristate "Serial I/O support" if EMBEDDED || !X86 | 5 | tristate "Serial I/O support" if EMBEDDED || !X86 |
6 | default y | 6 | default y |
7 | ---help--- | 7 | help |
8 | Say Yes here if you have any input device that uses serial I/O to | 8 | Say Yes here if you have any input device that uses serial I/O to |
9 | communicate with the system. This includes the | 9 | communicate with the system. This includes the |
10 | * standard AT keyboard and PS/2 mouse * | 10 | * standard AT keyboard and PS/2 mouse * |
@@ -22,7 +22,7 @@ config SERIO_I8042 | |||
22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 |
23 | default y | 23 | default y |
24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BLACKFIN | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BLACKFIN |
25 | ---help--- | 25 | help |
26 | i8042 is the chip over which the standard AT keyboard and PS/2 | 26 | i8042 is the chip over which the standard AT keyboard and PS/2 |
27 | mouse are connected to the computer. If you use these devices, | 27 | mouse are connected to the computer. If you use these devices, |
28 | you'll need to say Y here. | 28 | you'll need to say Y here. |
@@ -35,7 +35,7 @@ config SERIO_I8042 | |||
35 | config SERIO_SERPORT | 35 | config SERIO_SERPORT |
36 | tristate "Serial port line discipline" | 36 | tristate "Serial port line discipline" |
37 | default y | 37 | default y |
38 | ---help--- | 38 | help |
39 | Say Y here if you plan to use an input device (mouse, joystick, | 39 | Say Y here if you plan to use an input device (mouse, joystick, |
40 | tablet, 6dof) that communicates over the RS232 serial (COM) port. | 40 | tablet, 6dof) that communicates over the RS232 serial (COM) port. |
41 | 41 | ||
@@ -49,7 +49,7 @@ config SERIO_SERPORT | |||
49 | config SERIO_CT82C710 | 49 | config SERIO_CT82C710 |
50 | tristate "ct82c710 Aux port controller" | 50 | tristate "ct82c710 Aux port controller" |
51 | depends on X86 | 51 | depends on X86 |
52 | ---help--- | 52 | help |
53 | Say Y here if you have a Texas Instruments TravelMate notebook | 53 | Say Y here if you have a Texas Instruments TravelMate notebook |
54 | equipped with the ct82c710 chip and want to use a mouse connected | 54 | equipped with the ct82c710 chip and want to use a mouse connected |
55 | to the "QuickPort". | 55 | to the "QuickPort". |
@@ -66,7 +66,7 @@ config SERIO_Q40KBD | |||
66 | config SERIO_PARKBD | 66 | config SERIO_PARKBD |
67 | tristate "Parallel port keyboard adapter" | 67 | tristate "Parallel port keyboard adapter" |
68 | depends on PARPORT | 68 | depends on PARPORT |
69 | ---help--- | 69 | help |
70 | Say Y here if you built a simple parallel port adapter to attach | 70 | Say Y here if you built a simple parallel port adapter to attach |
71 | an additional AT keyboard, XT keyboard or PS/2 mouse. | 71 | an additional AT keyboard, XT keyboard or PS/2 mouse. |
72 | 72 | ||
@@ -124,7 +124,7 @@ config HP_SDC | |||
124 | tristate "HP System Device Controller i8042 Support" | 124 | tristate "HP System Device Controller i8042 Support" |
125 | depends on (GSC || HP300) && SERIO | 125 | depends on (GSC || HP300) && SERIO |
126 | default y | 126 | default y |
127 | ---help--- | 127 | help |
128 | This option enables support for the "System Device | 128 | This option enables support for the "System Device |
129 | Controller", an i8042 carrying microcode to manage a | 129 | Controller", an i8042 carrying microcode to manage a |
130 | few miscellaneous devices on some Hewlett Packard systems. | 130 | few miscellaneous devices on some Hewlett Packard systems. |
@@ -168,6 +168,7 @@ config SERIO_MACEPS2 | |||
168 | 168 | ||
169 | config SERIO_LIBPS2 | 169 | config SERIO_LIBPS2 |
170 | tristate "PS/2 driver library" if EMBEDDED | 170 | tristate "PS/2 driver library" if EMBEDDED |
171 | depends on SERIO_I8042 || SERIO_I8042=n | ||
171 | help | 172 | help |
172 | Say Y here if you are using a driver for device connected | 173 | Say Y here if you are using a driver for device connected |
173 | to a PS/2 port, such as PS/2 mouse or standard AT keyboard. | 174 | to a PS/2 port, such as PS/2 mouse or standard AT keyboard. |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a39bc4eb902b..a537925f7651 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -327,6 +327,17 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
327 | }, | 327 | }, |
328 | }, | 328 | }, |
329 | { | 329 | { |
330 | /* | ||
331 | * Reset and GET ID commands issued via KBD port are | ||
332 | * sometimes being delivered to AUX3. | ||
333 | */ | ||
334 | .ident = "Sony Vaio FZ-240E", | ||
335 | .matches = { | ||
336 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | ||
337 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), | ||
338 | }, | ||
339 | }, | ||
340 | { | ||
330 | .ident = "Amoi M636/A737", | 341 | .ident = "Amoi M636/A737", |
331 | .matches = { | 342 | .matches = { |
332 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), | 343 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), |
@@ -661,7 +672,7 @@ static void i8042_pnp_exit(void) | |||
661 | static int __init i8042_pnp_init(void) | 672 | static int __init i8042_pnp_init(void) |
662 | { | 673 | { |
663 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; | 674 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; |
664 | int pnp_data_busted = false; | 675 | bool pnp_data_busted = false; |
665 | int err; | 676 | int err; |
666 | 677 | ||
667 | #ifdef CONFIG_X86 | 678 | #ifdef CONFIG_X86 |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index bc56e52b945f..a31578170ccc 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -609,6 +609,8 @@ static irqreturn_t __init i8042_aux_test_irq(int irq, void *dev_id) | |||
609 | str = i8042_read_status(); | 609 | str = i8042_read_status(); |
610 | if (str & I8042_STR_OBF) { | 610 | if (str & I8042_STR_OBF) { |
611 | data = i8042_read_data(); | 611 | data = i8042_read_data(); |
612 | dbg("%02x <- i8042 (aux_test_irq, %s)", | ||
613 | data, str & I8042_STR_AUXDATA ? "aux" : "kbd"); | ||
612 | if (i8042_irq_being_tested && | 614 | if (i8042_irq_being_tested && |
613 | data == 0xa5 && (str & I8042_STR_AUXDATA)) | 615 | data == 0xa5 && (str & I8042_STR_AUXDATA)) |
614 | complete(&i8042_aux_irq_delivered); | 616 | complete(&i8042_aux_irq_delivered); |
@@ -750,6 +752,7 @@ static int __init i8042_check_aux(void) | |||
750 | * AUX IRQ was never delivered so we need to flush the controller to | 752 | * AUX IRQ was never delivered so we need to flush the controller to |
751 | * get rid of the byte we put there; otherwise keyboard may not work. | 753 | * get rid of the byte we put there; otherwise keyboard may not work. |
752 | */ | 754 | */ |
755 | dbg(" -- i8042 (aux irq test timeout)"); | ||
753 | i8042_flush(); | 756 | i8042_flush(); |
754 | retval = -1; | 757 | retval = -1; |
755 | } | 758 | } |
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index 769ba65a585a..f3876acc3e83 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/input.h> | 19 | #include <linux/input.h> |
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index b03009bb7468..27fdaaffbb40 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | ||
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
14 | #include <linux/poll.h> | 15 | #include <linux/poll.h> |
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c index b9694b6445d0..6d345112bcb7 100644 --- a/drivers/input/serio/serport.c +++ b/drivers/input/serio/serport.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | ||
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index f06332c9e21b..c21e6d3a8844 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c | |||
@@ -645,7 +645,7 @@ static int __devinit ad7879_probe(struct spi_device *spi) | |||
645 | kfree(ts); | 645 | kfree(ts); |
646 | } | 646 | } |
647 | 647 | ||
648 | return 0; | 648 | return error; |
649 | } | 649 | } |
650 | 650 | ||
651 | static int __devexit ad7879_remove(struct spi_device *spi) | 651 | static int __devexit ad7879_remove(struct spi_device *spi) |
@@ -732,7 +732,7 @@ static int __devinit ad7879_probe(struct i2c_client *client, | |||
732 | kfree(ts); | 732 | kfree(ts); |
733 | } | 733 | } |
734 | 734 | ||
735 | return 0; | 735 | return error; |
736 | } | 736 | } |
737 | 737 | ||
738 | static int __devexit ad7879_remove(struct i2c_client *client) | 738 | static int __devexit ad7879_remove(struct i2c_client *client) |