diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/ff-core.c | 18 | ||||
-rw-r--r-- | drivers/input/misc/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/mouse/appletouch.c | 49 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 7 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 8 | ||||
-rw-r--r-- | drivers/input/xen-kbdfront.c | 20 |
6 files changed, 85 insertions, 18 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/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/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 9aafa96cb746..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. |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 592ff55b62d0..170f71ee5772 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -952,8 +952,12 @@ static int i8042_resume(struct platform_device *dev) | |||
952 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; | 952 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; |
953 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); | 953 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); |
954 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 954 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
955 | printk(KERN_ERR "i8042: Can't write CTR to resume\n"); | 955 | printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n"); |
956 | 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 | } | ||
957 | } | 961 | } |
958 | 962 | ||
959 | 963 | ||
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c index 0f47f4697cdf..9ce3b3baf3a2 100644 --- a/drivers/input/xen-kbdfront.c +++ b/drivers/input/xen-kbdfront.c | |||
@@ -66,6 +66,9 @@ static irqreturn_t input_handler(int rq, void *dev_id) | |||
66 | case XENKBD_TYPE_MOTION: | 66 | case XENKBD_TYPE_MOTION: |
67 | input_report_rel(dev, REL_X, event->motion.rel_x); | 67 | input_report_rel(dev, REL_X, event->motion.rel_x); |
68 | input_report_rel(dev, REL_Y, event->motion.rel_y); | 68 | input_report_rel(dev, REL_Y, event->motion.rel_y); |
69 | if (event->motion.rel_z) | ||
70 | input_report_rel(dev, REL_WHEEL, | ||
71 | -event->motion.rel_z); | ||
69 | break; | 72 | break; |
70 | case XENKBD_TYPE_KEY: | 73 | case XENKBD_TYPE_KEY: |
71 | dev = NULL; | 74 | dev = NULL; |
@@ -84,6 +87,9 @@ static irqreturn_t input_handler(int rq, void *dev_id) | |||
84 | case XENKBD_TYPE_POS: | 87 | case XENKBD_TYPE_POS: |
85 | input_report_abs(dev, ABS_X, event->pos.abs_x); | 88 | input_report_abs(dev, ABS_X, event->pos.abs_x); |
86 | input_report_abs(dev, ABS_Y, event->pos.abs_y); | 89 | input_report_abs(dev, ABS_Y, event->pos.abs_y); |
90 | if (event->pos.rel_z) | ||
91 | input_report_rel(dev, REL_WHEEL, | ||
92 | -event->pos.rel_z); | ||
87 | break; | 93 | break; |
88 | } | 94 | } |
89 | if (dev) | 95 | if (dev) |
@@ -152,7 +158,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, | |||
152 | ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); | 158 | ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); |
153 | for (i = BTN_LEFT; i <= BTN_TASK; i++) | 159 | for (i = BTN_LEFT; i <= BTN_TASK; i++) |
154 | set_bit(i, ptr->keybit); | 160 | set_bit(i, ptr->keybit); |
155 | ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 161 | ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL); |
156 | input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0); | 162 | input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0); |
157 | input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0); | 163 | input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0); |
158 | 164 | ||
@@ -294,6 +300,16 @@ InitWait: | |||
294 | */ | 300 | */ |
295 | if (dev->state != XenbusStateConnected) | 301 | if (dev->state != XenbusStateConnected) |
296 | goto InitWait; /* no InitWait seen yet, fudge it */ | 302 | goto InitWait; /* no InitWait seen yet, fudge it */ |
303 | |||
304 | /* Set input abs params to match backend screen res */ | ||
305 | if (xenbus_scanf(XBT_NIL, info->xbdev->otherend, | ||
306 | "width", "%d", &val) > 0) | ||
307 | input_set_abs_params(info->ptr, ABS_X, 0, val, 0, 0); | ||
308 | |||
309 | if (xenbus_scanf(XBT_NIL, info->xbdev->otherend, | ||
310 | "height", "%d", &val) > 0) | ||
311 | input_set_abs_params(info->ptr, ABS_Y, 0, val, 0, 0); | ||
312 | |||
297 | break; | 313 | break; |
298 | 314 | ||
299 | case XenbusStateClosing: | 315 | case XenbusStateClosing: |
@@ -337,4 +353,6 @@ static void __exit xenkbd_cleanup(void) | |||
337 | module_init(xenkbd_init); | 353 | module_init(xenkbd_init); |
338 | module_exit(xenkbd_cleanup); | 354 | module_exit(xenkbd_cleanup); |
339 | 355 | ||
356 | MODULE_DESCRIPTION("Xen virtual keyboard/pointer device frontend"); | ||
340 | MODULE_LICENSE("GPL"); | 357 | MODULE_LICENSE("GPL"); |
358 | MODULE_ALIAS("xen:vkbd"); | ||