Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' into next

Conflicts:

drivers/input/mouse/appletouch.c

+161 -55
+2
drivers/input/keyboard/atkbd.c
··· 807 807 static void atkbd_cleanup(struct serio *serio) 808 808 { 809 809 struct atkbd *atkbd = serio_get_drvdata(serio); 810 + 811 + atkbd_disable(atkbd); 810 812 ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); 811 813 } 812 814
+24 -12
drivers/input/keyboard/pxa27x_keypad.c
··· 138 138 set_bit(code, input_dev->keybit); 139 139 } 140 140 141 + for (i = 0; i < pdata->direct_key_num; i++) 142 + set_bit(pdata->direct_key_map[i], input_dev->keybit); 143 + 141 144 keypad->rotary_up_key[0] = pdata->rotary0_up_key; 142 145 keypad->rotary_up_key[1] = pdata->rotary1_up_key; 143 146 keypad->rotary_down_key[0] = pdata->rotary0_down_key; ··· 148 145 keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; 149 146 keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; 150 147 151 - if (pdata->rotary0_up_key && pdata->rotary0_down_key) { 152 - set_bit(pdata->rotary0_up_key, input_dev->keybit); 153 - set_bit(pdata->rotary0_down_key, input_dev->keybit); 154 - } else 155 - set_bit(pdata->rotary0_rel_code, input_dev->relbit); 148 + if (pdata->enable_rotary0) { 149 + if (pdata->rotary0_up_key && pdata->rotary0_down_key) { 150 + set_bit(pdata->rotary0_up_key, input_dev->keybit); 151 + set_bit(pdata->rotary0_down_key, input_dev->keybit); 152 + } else 153 + set_bit(pdata->rotary0_rel_code, input_dev->relbit); 154 + } 156 155 157 - if (pdata->rotary1_up_key && pdata->rotary1_down_key) { 158 - set_bit(pdata->rotary1_up_key, input_dev->keybit); 159 - set_bit(pdata->rotary1_down_key, input_dev->keybit); 160 - } else 161 - set_bit(pdata->rotary1_rel_code, input_dev->relbit); 156 + if (pdata->enable_rotary1) { 157 + if (pdata->rotary1_up_key && pdata->rotary1_down_key) { 158 + set_bit(pdata->rotary1_up_key, input_dev->keybit); 159 + set_bit(pdata->rotary1_down_key, input_dev->keybit); 160 + } else 161 + set_bit(pdata->rotary1_rel_code, input_dev->relbit); 162 + } 162 163 } 163 164 164 165 static inline unsigned int lookup_matrix_keycode( ··· 500 493 keypad->input_dev = input_dev; 501 494 input_set_drvdata(input_dev, keypad); 502 495 503 - input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | 504 - BIT_MASK(EV_REL); 496 + input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); 497 + if ((keypad->pdata->enable_rotary0 && 498 + keypad->pdata->rotary0_rel_code) || 499 + (keypad->pdata->enable_rotary1 && 500 + keypad->pdata->rotary1_rel_code)) { 501 + input_dev->evbit[0] |= BIT_MASK(EV_REL); 502 + } 505 503 506 504 pxa27x_keypad_build_keycode(keypad); 507 505 platform_set_drvdata(pdev, keypad);
-1
drivers/input/misc/Kconfig
··· 15 15 config INPUT_PCSPKR 16 16 tristate "PC Speaker support" 17 17 depends on PCSPKR_PLATFORM 18 - depends on SND_PCSP=n 19 18 help 20 19 Say Y here if you want the standard PC Speaker to be used for 21 20 bells and whistles.
-1
drivers/input/misc/apanel.c
··· 20 20 #include <linux/module.h> 21 21 #include <linux/ioport.h> 22 22 #include <linux/io.h> 23 - #include <linux/module.h> 24 23 #include <linux/input-polldev.h> 25 24 #include <linux/i2c.h> 26 25 #include <linux/workqueue.h>
+41 -8
drivers/input/mouse/appletouch.c
··· 564 564 dev->open = 0; 565 565 } 566 566 567 + static int atp_handle_geyser(struct atp *dev) 568 + { 569 + struct usb_device *udev = dev->udev; 570 + 571 + if (dev->type != ATP_FOUNTAIN) { 572 + /* switch to raw sensor mode */ 573 + if (atp_geyser_init(udev)) 574 + return -EIO; 575 + 576 + printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); 577 + } 578 + 579 + return 0; 580 + } 581 + 567 582 static int atp_probe(struct usb_interface *iface, 568 583 const struct usb_device_id *id) 569 584 { ··· 623 608 else 624 609 dev->datalen = 64; 625 610 626 - if (dev->type != ATP_FOUNTAIN) { 627 - /* switch to raw sensor mode */ 628 - if (atp_geyser_init(udev)) 629 - goto err_free_devs; 630 - 631 - printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); 632 - } 633 - 634 611 dev->urb = usb_alloc_urb(0, GFP_KERNEL); 635 612 if (!dev->urb) 636 613 goto err_free_devs; ··· 635 628 usb_fill_int_urb(dev->urb, udev, 636 629 usb_rcvintpipe(udev, int_in_endpointAddr), 637 630 dev->data, dev->datalen, atp_complete, dev, 1); 631 + 632 + error = atp_handle_geyser(dev); 633 + if (error) 634 + goto err_free_buffer; 638 635 639 636 usb_make_path(udev, dev->phys, sizeof(dev->phys)); 640 637 strlcat(dev->phys, "/input0", sizeof(dev->phys)); ··· 732 721 printk(KERN_INFO "input: appletouch disconnected\n"); 733 722 } 734 723 724 + static int atp_recover(struct atp *dev) 725 + { 726 + int error; 727 + 728 + error = atp_handle_geyser(dev); 729 + if (error) 730 + return error; 731 + 732 + if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC)) 733 + return -EIO; 734 + 735 + return 0; 736 + } 737 + 735 738 static int atp_suspend(struct usb_interface *iface, pm_message_t message) 736 739 { 737 740 struct atp *dev = usb_get_intfdata(iface); ··· 766 741 return 0; 767 742 } 768 743 744 + static int atp_reset_resume(struct usb_interface *iface) 745 + { 746 + struct atp *dev = usb_get_intfdata(iface); 747 + 748 + return atp_recover(dev); 749 + } 750 + 769 751 static struct usb_driver atp_driver = { 770 752 .name = "appletouch", 771 753 .probe = atp_probe, 772 754 .disconnect = atp_disconnect, 773 755 .suspend = atp_suspend, 774 756 .resume = atp_resume, 757 + .reset_resume = atp_reset_resume, 775 758 .id_table = atp_table, 776 759 }; 777 760
+14
drivers/input/serio/i8042-x86ia64io.h
··· 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 204 * No data is coming from the touchscreen unless KBC 198 205 * is in legacy mode. ··· 340 333 .matches = { 341 334 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 342 335 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"), 336 + }, 337 + }, 338 + { 339 + .ident = "Acer TravelMate 660", 340 + .matches = { 341 + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 342 + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), 343 343 }, 344 344 }, 345 345 {
+31 -10
drivers/input/serio/i8042.c
··· 885 885 886 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(&param, 0x1059); 895 + if (error) 896 + printk(KERN_WARNING 897 + "Failed to enable DRITEK extension: %d\n", 898 + error); 899 + } 900 + #endif 901 + 888 902 #ifdef CONFIG_PM 889 903 /* 890 904 * Here we try to restore the original BIOS settings. We only want to ··· 952 938 i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; 953 939 i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); 954 940 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { 955 - printk(KERN_ERR "i8042: Can't write CTR to resume\n"); 956 - return -EIO; 941 + printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n"); 942 + msleep(50); 943 + if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { 944 + printk(KERN_ERR "i8042: CTR write retry failed\n"); 945 + return -EIO; 946 + } 957 947 } 948 + 949 + 950 + #ifdef CONFIG_X86 951 + if (i8042_dritek) 952 + i8042_dritek_enable(); 953 + #endif 958 954 959 955 if (i8042_mux_present) { 960 956 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) ··· 1184 1160 if (error) 1185 1161 return error; 1186 1162 1163 + #ifdef CONFIG_X86 1164 + if (i8042_dritek) 1165 + i8042_dritek_enable(); 1166 + #endif 1167 + 1187 1168 if (!i8042_noaux) { 1188 1169 error = i8042_setup_aux(); 1189 1170 if (error && error != -ENODEV && error != -EBUSY) ··· 1200 1171 if (error) 1201 1172 goto out_fail; 1202 1173 } 1203 - #ifdef CONFIG_X86 1204 - if (i8042_dritek) { 1205 - char param = 0x90; 1206 - error = i8042_command(&param, 0x1059); 1207 - if (error) 1208 - goto out_fail; 1209 - } 1210 - #endif 1211 1174 /* 1212 1175 * Ok, everything is ready, let's register all serio ports 1213 1176 */
+7 -10
drivers/input/tablet/gtco.c
··· 830 830 struct gtco *gtco; 831 831 struct input_dev *input_dev; 832 832 struct hid_descriptor *hid_desc; 833 - char *report = NULL; 833 + char *report; 834 834 int result = 0, retry; 835 835 int error; 836 836 struct usb_endpoint_descriptor *endpoint; ··· 916 916 le16_to_cpu(hid_desc->wDescriptorLength), 917 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 922 break; 923 + } 921 924 } 922 925 926 + kfree(report); 927 + 923 928 /* If we didn't get the report, fail */ 924 - dbg("usb_control_msg result: :%d", result); 925 929 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { 926 930 err("Failed to get HID Report Descriptor of size: %d", 927 931 hid_desc->wDescriptorLength); 928 932 error = -EIO; 929 933 goto err_free_urb; 930 934 } 931 - 932 - /* Now we parse the report */ 933 - parse_hid_report_descriptor(gtco, report, result); 934 - 935 - /* Now we delete it */ 936 - kfree(report); 937 935 938 936 /* Create a device file node */ 939 937 usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); ··· 986 988 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 987 989 gtco->buffer, gtco->buf_dma); 988 990 err_free_devs: 989 - kfree(report); 990 991 input_free_device(input_dev); 991 992 kfree(gtco); 992 993 return error;
+22
drivers/input/touchscreen/wm9713.c
··· 85 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 97 * Set adc mask function. 89 98 * 90 99 * Sources of glitch noise, such as signals driving an LCD display, may feed ··· 169 160 dig3 |= WM9712_RPU(rpu); 170 161 dev_info(wm->dev, "setting pen detect pull-up to %d Ohms\n", 171 162 64000 / rpu); 163 + } 164 + 165 + /* Five wire panel? */ 166 + if (five_wire) { 167 + dig3 |= WM9713_45W; 168 + dev_info(wm->dev, "setting 5-wire touchscreen mode."); 169 + 170 + if (pil) { 171 + dev_warn(wm->dev, 172 + "Pressure measurement not supported in 5 " 173 + "wire mode, disabling\n"); 174 + pil = 0; 175 + } 172 176 } 173 177 174 178 /* touchpanel pressure */
+13 -12
drivers/input/touchscreen/wm97xx-core.c
··· 608 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 622 wm->input_dev = input_allocate_device(); 612 623 if (wm->input_dev == NULL) { 613 624 ret = -ENOMEM; ··· 627 616 628 617 /* set up touch configuration */ 629 618 wm->input_dev->name = "wm97xx touchscreen"; 619 + wm->input_dev->phys = "wm97xx"; 630 620 wm->input_dev->open = wm97xx_ts_input_open; 631 621 wm->input_dev->close = wm97xx_ts_input_close; 632 622 set_bit(EV_ABS, wm->input_dev->evbit); ··· 645 633 ret = input_register_device(wm->input_dev); 646 634 if (ret < 0) 647 635 goto dev_alloc_err; 648 - 649 - /* set up physical characteristics */ 650 - wm->codec->phy_init(wm); 651 - 652 - /* load gpio cache */ 653 - wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); 654 - wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); 655 - wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); 656 - wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); 657 - wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); 658 - wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); 659 636 660 637 /* register our battery device */ 661 638 wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); ··· 802 801 EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); 803 802 804 803 static struct device_driver wm97xx_driver = { 805 - .name = "ac97", 804 + .name = "wm97xx-ts", 806 805 .bus = &ac97_bus_type, 807 806 .owner = THIS_MODULE, 808 807 .probe = wm97xx_probe,
+3
drivers/usb/core/quirks.c
··· 47 47 /* Edirol SD-20 */ 48 48 { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, 49 49 50 + /* appletouch */ 51 + { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, 52 + 50 53 /* M-Systems Flash Disk Pioneers */ 51 54 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, 52 55
+3 -1
include/linux/input.h
··· 639 639 #define SW_LID 0x00 /* set = lid shut */ 640 640 #define SW_TABLET_MODE 0x01 /* set = tablet mode */ 641 641 #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ 642 - #define SW_RADIO 0x03 /* set = radio enabled */ 642 + #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" 643 + set = radio enabled */ 644 + #define SW_RADIO SW_RFKILL_ALL /* deprecated */ 643 645 #define SW_MAX 0x0f 644 646 #define SW_CNT (SW_MAX+1) 645 647
+1
include/linux/wm97xx.h
··· 100 100 #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ 101 101 #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ 102 102 #define WM9713_COO 0x0001 /* enable coordinate mode */ 103 + #define WM9713_45W 0x1000 /* set for 5 wire panel */ 103 104 #define WM9713_PDEN 0x0800 /* measure only when pen down */ 104 105 #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ 105 106 #define WM9713_WAIT 0x0200 /* coordinate wait */