diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-06 08:23:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-06 08:23:39 -0400 |
commit | 68083e05d72d94f347293d8cc0067050ba904bfa (patch) | |
tree | 842e71365bd90866be7add181661a4039d891564 /drivers/input | |
parent | 7baac8b91f9871ba8cb09af84de4ae1d86d07812 (diff) | |
parent | b7279469d66b55119784b8b9529c99c1955fe747 (diff) |
Merge commit 'v2.6.26-rc9' into cpus4096
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/ff-core.c | 18 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 38 | ||||
-rw-r--r-- | drivers/input/misc/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/misc/apanel.c | 1 | ||||
-rw-r--r-- | drivers/input/mouse/appletouch.c | 49 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 14 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 41 | ||||
-rw-r--r-- | drivers/input/tablet/gtco.c | 17 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm9713.c | 22 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm97xx-core.c | 25 |
11 files changed, 167 insertions, 61 deletions
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index eebc72465fc9..72c63e5dd630 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/sched.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Check that the effect_id is a valid effect and whether the user | 34 | * Check that the effect_id is a valid effect and whether the user |
@@ -166,8 +167,10 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, | |||
166 | if (ret) | 167 | if (ret) |
167 | goto out; | 168 | goto out; |
168 | 169 | ||
170 | spin_lock_irq(&dev->event_lock); | ||
169 | ff->effects[id] = *effect; | 171 | ff->effects[id] = *effect; |
170 | ff->effect_owners[id] = file; | 172 | ff->effect_owners[id] = file; |
173 | spin_unlock_irq(&dev->event_lock); | ||
171 | 174 | ||
172 | out: | 175 | out: |
173 | mutex_unlock(&ff->mutex); | 176 | mutex_unlock(&ff->mutex); |
@@ -189,16 +192,22 @@ static int erase_effect(struct input_dev *dev, int effect_id, | |||
189 | if (error) | 192 | if (error) |
190 | return error; | 193 | return error; |
191 | 194 | ||
195 | spin_lock_irq(&dev->event_lock); | ||
192 | ff->playback(dev, effect_id, 0); | 196 | ff->playback(dev, effect_id, 0); |
197 | ff->effect_owners[effect_id] = NULL; | ||
198 | spin_unlock_irq(&dev->event_lock); | ||
193 | 199 | ||
194 | if (ff->erase) { | 200 | if (ff->erase) { |
195 | error = ff->erase(dev, effect_id); | 201 | error = ff->erase(dev, effect_id); |
196 | if (error) | 202 | if (error) { |
203 | spin_lock_irq(&dev->event_lock); | ||
204 | ff->effect_owners[effect_id] = file; | ||
205 | spin_unlock_irq(&dev->event_lock); | ||
206 | |||
197 | return error; | 207 | return error; |
208 | } | ||
198 | } | 209 | } |
199 | 210 | ||
200 | ff->effect_owners[effect_id] = NULL; | ||
201 | |||
202 | return 0; | 211 | return 0; |
203 | } | 212 | } |
204 | 213 | ||
@@ -263,8 +272,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type, | |||
263 | if (type != EV_FF) | 272 | if (type != EV_FF) |
264 | return 0; | 273 | return 0; |
265 | 274 | ||
266 | mutex_lock(&ff->mutex); | ||
267 | |||
268 | switch (code) { | 275 | switch (code) { |
269 | case FF_GAIN: | 276 | case FF_GAIN: |
270 | if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) | 277 | if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) |
@@ -286,7 +293,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type, | |||
286 | break; | 293 | break; |
287 | } | 294 | } |
288 | 295 | ||
289 | mutex_unlock(&ff->mutex); | ||
290 | return 0; | 296 | return 0; |
291 | } | 297 | } |
292 | EXPORT_SYMBOL_GPL(input_ff_event); | 298 | EXPORT_SYMBOL_GPL(input_ff_event); |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4a95adc4cc78..af58a6f1e898 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd) | |||
807 | static void atkbd_cleanup(struct serio *serio) | 807 | static void atkbd_cleanup(struct serio *serio) |
808 | { | 808 | { |
809 | struct atkbd *atkbd = serio_get_drvdata(serio); | 809 | struct atkbd *atkbd = serio_get_drvdata(serio); |
810 | |||
811 | atkbd_disable(atkbd); | ||
810 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); | 812 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); |
811 | } | 813 | } |
812 | 814 | ||
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 3dea0c5077a9..45767e73f071 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -136,6 +136,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
136 | set_bit(code, input_dev->keybit); | 136 | set_bit(code, input_dev->keybit); |
137 | } | 137 | } |
138 | 138 | ||
139 | for (i = 0; i < pdata->direct_key_num; i++) | ||
140 | set_bit(pdata->direct_key_map[i], input_dev->keybit); | ||
141 | |||
139 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; | 142 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; |
140 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; | 143 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; |
141 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; | 144 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; |
@@ -143,17 +146,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
143 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; | 146 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; |
144 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; | 147 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; |
145 | 148 | ||
146 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { | 149 | if (pdata->enable_rotary0) { |
147 | set_bit(pdata->rotary0_up_key, input_dev->keybit); | 150 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { |
148 | set_bit(pdata->rotary0_down_key, input_dev->keybit); | 151 | set_bit(pdata->rotary0_up_key, input_dev->keybit); |
149 | } else | 152 | set_bit(pdata->rotary0_down_key, input_dev->keybit); |
150 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | 153 | } else |
151 | 154 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | |
152 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { | 155 | } |
153 | set_bit(pdata->rotary1_up_key, input_dev->keybit); | 156 | |
154 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | 157 | if (pdata->enable_rotary1) { |
155 | } else | 158 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { |
156 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | 159 | set_bit(pdata->rotary1_up_key, input_dev->keybit); |
160 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | ||
161 | } else | ||
162 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | ||
163 | } | ||
157 | } | 164 | } |
158 | 165 | ||
159 | static inline unsigned int lookup_matrix_keycode( | 166 | static inline unsigned int lookup_matrix_keycode( |
@@ -484,8 +491,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
484 | keypad->input_dev = input_dev; | 491 | keypad->input_dev = input_dev; |
485 | input_set_drvdata(input_dev, keypad); | 492 | input_set_drvdata(input_dev, keypad); |
486 | 493 | ||
487 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | | 494 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
488 | BIT_MASK(EV_REL); | 495 | if ((keypad->pdata->enable_rotary0 && |
496 | keypad->pdata->rotary0_rel_code) || | ||
497 | (keypad->pdata->enable_rotary1 && | ||
498 | keypad->pdata->rotary1_rel_code)) { | ||
499 | input_dev->evbit[0] |= BIT_MASK(EV_REL); | ||
500 | } | ||
489 | 501 | ||
490 | pxa27x_keypad_build_keycode(keypad); | 502 | pxa27x_keypad_build_keycode(keypad); |
491 | platform_set_drvdata(pdev, keypad); | 503 | platform_set_drvdata(pdev, keypad); |
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 3ad8bd9f7543..432699d61c58 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -15,7 +15,6 @@ if INPUT_MISC | |||
15 | config INPUT_PCSPKR | 15 | config INPUT_PCSPKR |
16 | tristate "PC Speaker support" | 16 | tristate "PC Speaker support" |
17 | depends on PCSPKR_PLATFORM | 17 | depends on PCSPKR_PLATFORM |
18 | depends on SND_PCSP=n | ||
19 | help | 18 | help |
20 | Say Y here if you want the standard PC Speaker to be used for | 19 | Say Y here if you want the standard PC Speaker to be used for |
21 | bells and whistles. | 20 | bells and whistles. |
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index 9531d8c7444f..d82f7f727f7a 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/module.h> | ||
24 | #include <linux/input-polldev.h> | 23 | #include <linux/input-polldev.h> |
25 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
26 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 8dd3942f3022..ce6fdec19e14 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -589,6 +589,21 @@ static void atp_close(struct input_dev *input) | |||
589 | dev->open = 0; | 589 | dev->open = 0; |
590 | } | 590 | } |
591 | 591 | ||
592 | static int atp_handle_geyser(struct atp *dev) | ||
593 | { | ||
594 | struct usb_device *udev = dev->udev; | ||
595 | |||
596 | if (!atp_is_fountain(dev)) { | ||
597 | /* switch to raw sensor mode */ | ||
598 | if (atp_geyser_init(udev)) | ||
599 | return -EIO; | ||
600 | |||
601 | printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); | ||
602 | } | ||
603 | |||
604 | return 0; | ||
605 | } | ||
606 | |||
592 | static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id) | 607 | static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id) |
593 | { | 608 | { |
594 | struct atp *dev; | 609 | struct atp *dev; |
@@ -633,14 +648,6 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id | |||
633 | else | 648 | else |
634 | dev->datalen = 81; | 649 | dev->datalen = 81; |
635 | 650 | ||
636 | if (!atp_is_fountain(dev)) { | ||
637 | /* switch to raw sensor mode */ | ||
638 | if (atp_geyser_init(udev)) | ||
639 | goto err_free_devs; | ||
640 | |||
641 | printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); | ||
642 | } | ||
643 | |||
644 | dev->urb = usb_alloc_urb(0, GFP_KERNEL); | 651 | dev->urb = usb_alloc_urb(0, GFP_KERNEL); |
645 | if (!dev->urb) | 652 | if (!dev->urb) |
646 | goto err_free_devs; | 653 | goto err_free_devs; |
@@ -654,6 +661,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id | |||
654 | usb_rcvintpipe(udev, int_in_endpointAddr), | 661 | usb_rcvintpipe(udev, int_in_endpointAddr), |
655 | dev->data, dev->datalen, atp_complete, dev, 1); | 662 | dev->data, dev->datalen, atp_complete, dev, 1); |
656 | 663 | ||
664 | error = atp_handle_geyser(dev); | ||
665 | if (error) | ||
666 | goto err_free_buffer; | ||
667 | |||
657 | usb_make_path(udev, dev->phys, sizeof(dev->phys)); | 668 | usb_make_path(udev, dev->phys, sizeof(dev->phys)); |
658 | strlcat(dev->phys, "/input0", sizeof(dev->phys)); | 669 | strlcat(dev->phys, "/input0", sizeof(dev->phys)); |
659 | 670 | ||
@@ -744,6 +755,20 @@ static void atp_disconnect(struct usb_interface *iface) | |||
744 | printk(KERN_INFO "input: appletouch disconnected\n"); | 755 | printk(KERN_INFO "input: appletouch disconnected\n"); |
745 | } | 756 | } |
746 | 757 | ||
758 | static int atp_recover(struct atp *dev) | ||
759 | { | ||
760 | int error; | ||
761 | |||
762 | error = atp_handle_geyser(dev); | ||
763 | if (error) | ||
764 | return error; | ||
765 | |||
766 | if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC)) | ||
767 | return -EIO; | ||
768 | |||
769 | return 0; | ||
770 | } | ||
771 | |||
747 | static int atp_suspend(struct usb_interface *iface, pm_message_t message) | 772 | static int atp_suspend(struct usb_interface *iface, pm_message_t message) |
748 | { | 773 | { |
749 | struct atp *dev = usb_get_intfdata(iface); | 774 | struct atp *dev = usb_get_intfdata(iface); |
@@ -764,12 +789,20 @@ static int atp_resume(struct usb_interface *iface) | |||
764 | return 0; | 789 | return 0; |
765 | } | 790 | } |
766 | 791 | ||
792 | static int atp_reset_resume(struct usb_interface *iface) | ||
793 | { | ||
794 | struct atp *dev = usb_get_intfdata(iface); | ||
795 | |||
796 | return atp_recover(dev); | ||
797 | } | ||
798 | |||
767 | static struct usb_driver atp_driver = { | 799 | static struct usb_driver atp_driver = { |
768 | .name = "appletouch", | 800 | .name = "appletouch", |
769 | .probe = atp_probe, | 801 | .probe = atp_probe, |
770 | .disconnect = atp_disconnect, | 802 | .disconnect = atp_disconnect, |
771 | .suspend = atp_suspend, | 803 | .suspend = atp_suspend, |
772 | .resume = atp_resume, | 804 | .resume = atp_resume, |
805 | .reset_resume = atp_reset_resume, | ||
773 | .id_table = atp_table, | 806 | .id_table = atp_table, |
774 | }; | 807 | }; |
775 | 808 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 5ece9f56babc..78eb7841174c 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -193,6 +193,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
193 | }, | 193 | }, |
194 | }, | 194 | }, |
195 | { | 195 | { |
196 | .ident = "Fujitsu-Siemens Amilo Pro 2030", | ||
197 | .matches = { | ||
198 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
199 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), | ||
200 | }, | ||
201 | }, | ||
202 | { | ||
196 | /* | 203 | /* |
197 | * No data is coming from the touchscreen unless KBC | 204 | * No data is coming from the touchscreen unless KBC |
198 | * is in legacy mode. | 205 | * is in legacy mode. |
@@ -331,6 +338,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { | |||
331 | }, | 338 | }, |
332 | }, | 339 | }, |
333 | { | 340 | { |
341 | .ident = "Acer TravelMate 660", | ||
342 | .matches = { | ||
343 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
344 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), | ||
345 | }, | ||
346 | }, | ||
347 | { | ||
334 | .ident = "Acer TravelMate 2490", | 348 | .ident = "Acer TravelMate 2490", |
335 | .matches = { | 349 | .matches = { |
336 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 350 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 65a74cfc187b..170f71ee5772 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -885,6 +885,20 @@ static long i8042_panic_blink(long count) | |||
885 | 885 | ||
886 | #undef DELAY | 886 | #undef DELAY |
887 | 887 | ||
888 | #ifdef CONFIG_X86 | ||
889 | static void i8042_dritek_enable(void) | ||
890 | { | ||
891 | char param = 0x90; | ||
892 | int error; | ||
893 | |||
894 | error = i8042_command(¶m, 0x1059); | ||
895 | if (error) | ||
896 | printk(KERN_WARNING | ||
897 | "Failed to enable DRITEK extension: %d\n", | ||
898 | error); | ||
899 | } | ||
900 | #endif | ||
901 | |||
888 | #ifdef CONFIG_PM | 902 | #ifdef CONFIG_PM |
889 | /* | 903 | /* |
890 | * Here we try to restore the original BIOS settings. We only want to | 904 | * Here we try to restore the original BIOS settings. We only want to |
@@ -938,10 +952,20 @@ static int i8042_resume(struct platform_device *dev) | |||
938 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; | 952 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; |
939 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); | 953 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); |
940 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 954 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
941 | printk(KERN_ERR "i8042: Can't write CTR to resume\n"); | 955 | printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n"); |
942 | return -EIO; | 956 | msleep(50); |
957 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | ||
958 | printk(KERN_ERR "i8042: CTR write retry failed\n"); | ||
959 | return -EIO; | ||
960 | } | ||
943 | } | 961 | } |
944 | 962 | ||
963 | |||
964 | #ifdef CONFIG_X86 | ||
965 | if (i8042_dritek) | ||
966 | i8042_dritek_enable(); | ||
967 | #endif | ||
968 | |||
945 | if (i8042_mux_present) { | 969 | if (i8042_mux_present) { |
946 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) | 970 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) |
947 | printk(KERN_WARNING | 971 | printk(KERN_WARNING |
@@ -1160,6 +1184,11 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1160 | if (error) | 1184 | if (error) |
1161 | return error; | 1185 | return error; |
1162 | 1186 | ||
1187 | #ifdef CONFIG_X86 | ||
1188 | if (i8042_dritek) | ||
1189 | i8042_dritek_enable(); | ||
1190 | #endif | ||
1191 | |||
1163 | if (!i8042_noaux) { | 1192 | if (!i8042_noaux) { |
1164 | error = i8042_setup_aux(); | 1193 | error = i8042_setup_aux(); |
1165 | if (error && error != -ENODEV && error != -EBUSY) | 1194 | if (error && error != -ENODEV && error != -EBUSY) |
@@ -1171,14 +1200,6 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1171 | if (error) | 1200 | if (error) |
1172 | goto out_fail; | 1201 | goto out_fail; |
1173 | } | 1202 | } |
1174 | #ifdef CONFIG_X86 | ||
1175 | if (i8042_dritek) { | ||
1176 | char param = 0x90; | ||
1177 | error = i8042_command(¶m, 0x1059); | ||
1178 | if (error) | ||
1179 | goto out_fail; | ||
1180 | } | ||
1181 | #endif | ||
1182 | /* | 1203 | /* |
1183 | * Ok, everything is ready, let's register all serio ports | 1204 | * Ok, everything is ready, let's register all serio ports |
1184 | */ | 1205 | */ |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index c5a8661a1baa..1e748e46d12e 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
830 | struct gtco *gtco; | 830 | struct gtco *gtco; |
831 | struct input_dev *input_dev; | 831 | struct input_dev *input_dev; |
832 | struct hid_descriptor *hid_desc; | 832 | struct hid_descriptor *hid_desc; |
833 | char *report = NULL; | 833 | char *report; |
834 | int result = 0, retry; | 834 | int result = 0, retry; |
835 | int error; | 835 | int error; |
836 | struct usb_endpoint_descriptor *endpoint; | 836 | struct usb_endpoint_descriptor *endpoint; |
@@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
916 | le16_to_cpu(hid_desc->wDescriptorLength), | 916 | le16_to_cpu(hid_desc->wDescriptorLength), |
917 | 5000); /* 5 secs */ | 917 | 5000); /* 5 secs */ |
918 | 918 | ||
919 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) | 919 | dbg("usb_control_msg result: %d", result); |
920 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { | ||
921 | parse_hid_report_descriptor(gtco, report, result); | ||
920 | break; | 922 | break; |
923 | } | ||
921 | } | 924 | } |
922 | 925 | ||
926 | kfree(report); | ||
927 | |||
923 | /* If we didn't get the report, fail */ | 928 | /* If we didn't get the report, fail */ |
924 | dbg("usb_control_msg result: :%d", result); | ||
925 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { | 929 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { |
926 | err("Failed to get HID Report Descriptor of size: %d", | 930 | err("Failed to get HID Report Descriptor of size: %d", |
927 | hid_desc->wDescriptorLength); | 931 | hid_desc->wDescriptorLength); |
@@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
929 | goto err_free_urb; | 933 | goto err_free_urb; |
930 | } | 934 | } |
931 | 935 | ||
932 | /* Now we parse the report */ | ||
933 | parse_hid_report_descriptor(gtco, report, result); | ||
934 | |||
935 | /* Now we delete it */ | ||
936 | kfree(report); | ||
937 | |||
938 | /* Create a device file node */ | 936 | /* Create a device file node */ |
939 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); | 937 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); |
940 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); | 938 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); |
@@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
988 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, | 986 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, |
989 | gtco->buffer, gtco->buf_dma); | 987 | gtco->buffer, gtco->buf_dma); |
990 | err_free_devs: | 988 | err_free_devs: |
991 | kfree(report); | ||
992 | input_free_device(input_dev); | 989 | input_free_device(input_dev); |
993 | kfree(gtco); | 990 | kfree(gtco); |
994 | return error; | 991 | return error; |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 01278bd7e65c..838458792ea0 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -85,6 +85,15 @@ module_param(delay, int, 0); | |||
85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); | 85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Set five_wire = 1 to use a 5 wire touchscreen. | ||
89 | * | ||
90 | * NOTE: Five wire mode does not allow for readback of pressure. | ||
91 | */ | ||
92 | static int five_wire; | ||
93 | module_param(five_wire, int, 0); | ||
94 | MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); | ||
95 | |||
96 | /* | ||
88 | * Set adc mask function. | 97 | * Set adc mask function. |
89 | * | 98 | * |
90 | * Sources of glitch noise, such as signals driving an LCD display, may feed | 99 | * Sources of glitch noise, such as signals driving an LCD display, may feed |
@@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm) | |||
162 | 64000 / rpu); | 171 | 64000 / rpu); |
163 | } | 172 | } |
164 | 173 | ||
174 | /* Five wire panel? */ | ||
175 | if (five_wire) { | ||
176 | dig3 |= WM9713_45W; | ||
177 | dev_info(wm->dev, "setting 5-wire touchscreen mode."); | ||
178 | |||
179 | if (pil) { | ||
180 | dev_warn(wm->dev, | ||
181 | "Pressure measurement not supported in 5 " | ||
182 | "wire mode, disabling\n"); | ||
183 | pil = 0; | ||
184 | } | ||
185 | } | ||
186 | |||
165 | /* touchpanel pressure */ | 187 | /* touchpanel pressure */ |
166 | if (pil == 2) { | 188 | if (pil == 2) { |
167 | dig3 |= WM9712_PIL; | 189 | dig3 |= WM9712_PIL; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index e9c7ea46b6e3..cdc24ad314e0 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev) | |||
608 | goto alloc_err; | 608 | goto alloc_err; |
609 | } | 609 | } |
610 | 610 | ||
611 | /* set up physical characteristics */ | ||
612 | wm->codec->phy_init(wm); | ||
613 | |||
614 | /* load gpio cache */ | ||
615 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
616 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
617 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
618 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
619 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
620 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
621 | |||
611 | wm->input_dev = input_allocate_device(); | 622 | wm->input_dev = input_allocate_device(); |
612 | if (wm->input_dev == NULL) { | 623 | if (wm->input_dev == NULL) { |
613 | ret = -ENOMEM; | 624 | ret = -ENOMEM; |
@@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev) | |||
616 | 627 | ||
617 | /* set up touch configuration */ | 628 | /* set up touch configuration */ |
618 | wm->input_dev->name = "wm97xx touchscreen"; | 629 | wm->input_dev->name = "wm97xx touchscreen"; |
630 | wm->input_dev->phys = "wm97xx"; | ||
619 | wm->input_dev->open = wm97xx_ts_input_open; | 631 | wm->input_dev->open = wm97xx_ts_input_open; |
620 | wm->input_dev->close = wm97xx_ts_input_close; | 632 | wm->input_dev->close = wm97xx_ts_input_close; |
621 | set_bit(EV_ABS, wm->input_dev->evbit); | 633 | set_bit(EV_ABS, wm->input_dev->evbit); |
@@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev) | |||
634 | if (ret < 0) | 646 | if (ret < 0) |
635 | goto dev_alloc_err; | 647 | goto dev_alloc_err; |
636 | 648 | ||
637 | /* set up physical characteristics */ | ||
638 | wm->codec->phy_init(wm); | ||
639 | |||
640 | /* load gpio cache */ | ||
641 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
642 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
643 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
644 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
645 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
646 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
647 | |||
648 | /* register our battery device */ | 649 | /* register our battery device */ |
649 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); | 650 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); |
650 | if (!wm->battery_dev) { | 651 | if (!wm->battery_dev) { |
@@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm) | |||
801 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); | 802 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); |
802 | 803 | ||
803 | static struct device_driver wm97xx_driver = { | 804 | static struct device_driver wm97xx_driver = { |
804 | .name = "ac97", | 805 | .name = "wm97xx-ts", |
805 | .bus = &ac97_bus_type, | 806 | .bus = &ac97_bus_type, |
806 | .owner = THIS_MODULE, | 807 | .owner = THIS_MODULE, |
807 | .probe = wm97xx_probe, | 808 | .probe = wm97xx_probe, |