Skip to content

Commit 952f4a0

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: appletouch - implement reset-resume logic Input: i8042 - retry failed CTR writes when resuming Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table Input: pcspkr - remove negative dependency on snd-pcsp Manually fixed up trivial conflict in drivers/usb/core/quirks.c
2 parents f948d56 + 90d95ef commit 952f4a0

File tree

5 files changed

+57
-11
lines changed

5 files changed

+57
-11
lines changed

drivers/input/misc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if INPUT_MISC
1515
config INPUT_PCSPKR
1616
tristate "PC Speaker support"
1717
depends on PCSPKR_PLATFORM
18-
depends on SND_PCSP=n
1918
help
2019
Say Y here if you want the standard PC Speaker to be used for
2120
bells and whistles.

drivers/input/mouse/appletouch.c

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,21 @@ static void atp_close(struct input_dev *input)
589589
dev->open = 0;
590590
}
591591

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+
592607
static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id)
593608
{
594609
struct atp *dev;
@@ -633,14 +648,6 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
633648
else
634649
dev->datalen = 81;
635650

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-
644651
dev->urb = usb_alloc_urb(0, GFP_KERNEL);
645652
if (!dev->urb)
646653
goto err_free_devs;
@@ -654,6 +661,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
654661
usb_rcvintpipe(udev, int_in_endpointAddr),
655662
dev->data, dev->datalen, atp_complete, dev, 1);
656663

664+
error = atp_handle_geyser(dev);
665+
if (error)
666+
goto err_free_buffer;
667+
657668
usb_make_path(udev, dev->phys, sizeof(dev->phys));
658669
strlcat(dev->phys, "/input0", sizeof(dev->phys));
659670

@@ -744,6 +755,20 @@ static void atp_disconnect(struct usb_interface *iface)
744755
printk(KERN_INFO "input: appletouch disconnected\n");
745756
}
746757

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+
747772
static int atp_suspend(struct usb_interface *iface, pm_message_t message)
748773
{
749774
struct atp *dev = usb_get_intfdata(iface);
@@ -764,12 +789,20 @@ static int atp_resume(struct usb_interface *iface)
764789
return 0;
765790
}
766791

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+
767799
static struct usb_driver atp_driver = {
768800
.name = "appletouch",
769801
.probe = atp_probe,
770802
.disconnect = atp_disconnect,
771803
.suspend = atp_suspend,
772804
.resume = atp_resume,
805+
.reset_resume = atp_reset_resume,
773806
.id_table = atp_table,
774807
};
775808

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
192192
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
193193
},
194194
},
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+
},
195202
{
196203
/*
197204
* No data is coming from the touchscreen unless KBC

drivers/input/serio/i8042.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,12 @@ static int i8042_resume(struct platform_device *dev)
952952
i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
953953
i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
954954
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
955-
printk(KERN_ERR "i8042: Can't write CTR to resume\n");
956-
return -EIO;
955+
printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
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+
}
957961
}
958962

959963

drivers/usb/core/quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ static const struct usb_device_id usb_quirk_list[] = {
4747
/* Edirol SD-20 */
4848
{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },
4949

50+
/* appletouch */
51+
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
52+
5053
/* Avision AV600U */
5154
{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
5255
USB_QUIRK_STRING_FETCH_255 },

0 commit comments

Comments
 (0)