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

Configure Feed

Select the types of activity you want to include in your feed.

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: gpio-keys - use IRQF_SHARED
Input: winbond-cir - select LEDS_TRIGGERS
Input: i8042 - try to get stable CTR value when initializing
Input: atkbd - add a quirk for OQO 01+ multimedia keys

+66 -7
+36
drivers/input/keyboard/atkbd.c
··· 233 233 */ 234 234 static void (*atkbd_platform_fixup)(struct atkbd *, const void *data); 235 235 static void *atkbd_platform_fixup_data; 236 + static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); 236 237 237 238 static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, 238 239 ssize_t (*handler)(struct atkbd *, char *)); ··· 393 392 goto out; 394 393 395 394 input_event(dev, EV_MSC, MSC_RAW, code); 395 + 396 + if (atkbd_platform_scancode_fixup) 397 + code = atkbd_platform_scancode_fixup(atkbd, code); 396 398 397 399 if (atkbd->translated) { 398 400 ··· 925 921 static unsigned int atkbd_volume_forced_release_keys[] = { 926 922 0xae, 0xb0, -1U 927 923 }; 924 + 925 + /* 926 + * OQO 01+ multimedia keys (64--66) generate e0 6x upon release whereas 927 + * they should be generating e4-e6 (0x80 | code). 928 + */ 929 + static unsigned int atkbd_oqo_01plus_scancode_fixup(struct atkbd *atkbd, 930 + unsigned int code) 931 + { 932 + if (atkbd->translated && atkbd->emul == 1 && 933 + (code == 0x64 || code == 0x65 || code == 0x66)) { 934 + atkbd->emul = 0; 935 + code |= 0x80; 936 + } 937 + 938 + return code; 939 + } 928 940 929 941 /* 930 942 * atkbd_set_keycode_table() initializes keyboard's keycode table ··· 1547 1527 return 0; 1548 1528 } 1549 1529 1530 + static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id) 1531 + { 1532 + atkbd_platform_scancode_fixup = id->driver_data; 1533 + 1534 + return 0; 1535 + } 1536 + 1550 1537 static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { 1551 1538 { 1552 1539 .ident = "Dell Laptop", ··· 1689 1662 }, 1690 1663 .callback = atkbd_setup_forced_release, 1691 1664 .driver_data = atkdb_soltech_ta12_forced_release_keys, 1665 + }, 1666 + { 1667 + .ident = "OQO Model 01+", 1668 + .matches = { 1669 + DMI_MATCH(DMI_SYS_VENDOR, "OQO"), 1670 + DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"), 1671 + }, 1672 + .callback = atkbd_setup_scancode_fixup, 1673 + .driver_data = atkbd_oqo_01plus_scancode_fixup, 1692 1674 }, 1693 1675 { } 1694 1676 };
+1
drivers/input/keyboard/gpio_keys.c
··· 147 147 } 148 148 149 149 error = request_irq(irq, gpio_keys_isr, 150 + IRQF_SHARED | 150 151 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 151 152 button->desc ? button->desc : "gpio_keys", 152 153 bdata);
+1
drivers/input/misc/Kconfig
··· 227 227 depends on X86 && PNP 228 228 select NEW_LEDS 229 229 select LEDS_CLASS 230 + select LEDS_TRIGGERS 230 231 select BITREVERSE 231 232 help 232 233 Say Y here if you want to use the IR remote functionality found
+28 -7
drivers/input/serio/i8042.c
··· 836 836 static int i8042_controller_init(void) 837 837 { 838 838 unsigned long flags; 839 + int n = 0; 840 + unsigned char ctr[2]; 839 841 840 842 /* 841 - * Save the CTR for restoral on unload / reboot. 843 + * Save the CTR for restore on unload / reboot. 842 844 */ 843 845 844 - if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) { 845 - printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n"); 846 - return -EIO; 847 - } 846 + do { 847 + if (n >= 10) { 848 + printk(KERN_ERR 849 + "i8042.c: Unable to get stable CTR read.\n"); 850 + return -EIO; 851 + } 848 852 849 - i8042_initial_ctr = i8042_ctr; 853 + if (n != 0) 854 + udelay(50); 855 + 856 + if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) { 857 + printk(KERN_ERR 858 + "i8042.c: Can't read CTR while initializing i8042.\n"); 859 + return -EIO; 860 + } 861 + 862 + } while (n < 2 || ctr[0] != ctr[1]); 863 + 864 + i8042_initial_ctr = i8042_ctr = ctr[0]; 850 865 851 866 /* 852 867 * Disable the keyboard interface and interrupt. ··· 910 895 return -EIO; 911 896 } 912 897 898 + /* 899 + * Flush whatever accumulated while we were disabling keyboard port. 900 + */ 901 + 902 + i8042_flush(); 903 + 913 904 return 0; 914 905 } 915 906 ··· 935 914 i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS; 936 915 i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT); 937 916 938 - if (i8042_command(&i8042_initial_ctr, I8042_CMD_CTL_WCTR)) 917 + if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) 939 918 printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n"); 940 919 941 920 /*