diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-03 10:46:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-03 10:46:17 -0500 |
commit | 1c211849d893b14cc923a18708923954fdd2c63e (patch) | |
tree | a5a84e45126e3aeb4c4a77648a047aeba93a5e68 /drivers | |
parent | fcef24d38e8f974673d158866e60763ac4f2161b (diff) | |
parent | 558a5e296a02266ef43d6e933ee35df9976de987 (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 36 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 35 |
4 files changed, 66 insertions, 7 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index a6512372c7a3..4452eabbee6d 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -233,6 +233,7 @@ struct atkbd { | |||
233 | */ | 233 | */ |
234 | static void (*atkbd_platform_fixup)(struct atkbd *, const void *data); | 234 | static void (*atkbd_platform_fixup)(struct atkbd *, const void *data); |
235 | static void *atkbd_platform_fixup_data; | 235 | static void *atkbd_platform_fixup_data; |
236 | static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); | ||
236 | 237 | ||
237 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, | 238 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, |
238 | ssize_t (*handler)(struct atkbd *, char *)); | 239 | ssize_t (*handler)(struct atkbd *, char *)); |
@@ -393,6 +394,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
393 | 394 | ||
394 | input_event(dev, EV_MSC, MSC_RAW, code); | 395 | input_event(dev, EV_MSC, MSC_RAW, code); |
395 | 396 | ||
397 | if (atkbd_platform_scancode_fixup) | ||
398 | code = atkbd_platform_scancode_fixup(atkbd, code); | ||
399 | |||
396 | if (atkbd->translated) { | 400 | if (atkbd->translated) { |
397 | 401 | ||
398 | if (atkbd->emul || atkbd_need_xlate(atkbd->xl_bit, code)) { | 402 | if (atkbd->emul || atkbd_need_xlate(atkbd->xl_bit, code)) { |
@@ -923,6 +927,22 @@ static unsigned int atkbd_volume_forced_release_keys[] = { | |||
923 | }; | 927 | }; |
924 | 928 | ||
925 | /* | 929 | /* |
930 | * OQO 01+ multimedia keys (64--66) generate e0 6x upon release whereas | ||
931 | * they should be generating e4-e6 (0x80 | code). | ||
932 | */ | ||
933 | static unsigned int atkbd_oqo_01plus_scancode_fixup(struct atkbd *atkbd, | ||
934 | unsigned int code) | ||
935 | { | ||
936 | if (atkbd->translated && atkbd->emul == 1 && | ||
937 | (code == 0x64 || code == 0x65 || code == 0x66)) { | ||
938 | atkbd->emul = 0; | ||
939 | code |= 0x80; | ||
940 | } | ||
941 | |||
942 | return code; | ||
943 | } | ||
944 | |||
945 | /* | ||
926 | * atkbd_set_keycode_table() initializes keyboard's keycode table | 946 | * atkbd_set_keycode_table() initializes keyboard's keycode table |
927 | * according to the selected scancode set | 947 | * according to the selected scancode set |
928 | */ | 948 | */ |
@@ -1527,6 +1547,13 @@ static int __init atkbd_setup_forced_release(const struct dmi_system_id *id) | |||
1527 | return 0; | 1547 | return 0; |
1528 | } | 1548 | } |
1529 | 1549 | ||
1550 | static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id) | ||
1551 | { | ||
1552 | atkbd_platform_scancode_fixup = id->driver_data; | ||
1553 | |||
1554 | return 0; | ||
1555 | } | ||
1556 | |||
1530 | static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | 1557 | static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { |
1531 | { | 1558 | { |
1532 | .ident = "Dell Laptop", | 1559 | .ident = "Dell Laptop", |
@@ -1663,6 +1690,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1663 | .callback = atkbd_setup_forced_release, | 1690 | .callback = atkbd_setup_forced_release, |
1664 | .driver_data = atkdb_soltech_ta12_forced_release_keys, | 1691 | .driver_data = atkdb_soltech_ta12_forced_release_keys, |
1665 | }, | 1692 | }, |
1693 | { | ||
1694 | .ident = "OQO Model 01+", | ||
1695 | .matches = { | ||
1696 | DMI_MATCH(DMI_SYS_VENDOR, "OQO"), | ||
1697 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"), | ||
1698 | }, | ||
1699 | .callback = atkbd_setup_scancode_fixup, | ||
1700 | .driver_data = atkbd_oqo_01plus_scancode_fixup, | ||
1701 | }, | ||
1666 | { } | 1702 | { } |
1667 | }; | 1703 | }; |
1668 | 1704 | ||
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index a88aff3816a0..77d130914259 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -147,6 +147,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
147 | } | 147 | } |
148 | 148 | ||
149 | error = request_irq(irq, gpio_keys_isr, | 149 | error = request_irq(irq, gpio_keys_isr, |
150 | IRQF_SHARED | | ||
150 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 151 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
151 | button->desc ? button->desc : "gpio_keys", | 152 | button->desc ? button->desc : "gpio_keys", |
152 | bdata); | 153 | bdata); |
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 02f4f8f1db6f..a9bb2544b2de 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -227,6 +227,7 @@ config INPUT_WINBOND_CIR | |||
227 | depends on X86 && PNP | 227 | depends on X86 && PNP |
228 | select NEW_LEDS | 228 | select NEW_LEDS |
229 | select LEDS_CLASS | 229 | select LEDS_CLASS |
230 | select LEDS_TRIGGERS | ||
230 | select BITREVERSE | 231 | select BITREVERSE |
231 | help | 232 | help |
232 | Say Y here if you want to use the IR remote functionality found | 233 | Say Y here if you want to use the IR remote functionality found |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index a31578170ccc..1df02d25aca5 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -836,17 +836,32 @@ static int i8042_controller_selftest(void) | |||
836 | static int i8042_controller_init(void) | 836 | static int i8042_controller_init(void) |
837 | { | 837 | { |
838 | unsigned long flags; | 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)) { | 846 | do { |
845 | printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n"); | 847 | if (n >= 10) { |
846 | return -EIO; | 848 | printk(KERN_ERR |
847 | } | 849 | "i8042.c: Unable to get stable CTR read.\n"); |
850 | return -EIO; | ||
851 | } | ||
852 | |||
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 | } | ||
848 | 861 | ||
849 | i8042_initial_ctr = i8042_ctr; | 862 | } while (n < 2 || ctr[0] != ctr[1]); |
863 | |||
864 | i8042_initial_ctr = i8042_ctr = ctr[0]; | ||
850 | 865 | ||
851 | /* | 866 | /* |
852 | * Disable the keyboard interface and interrupt. | 867 | * Disable the keyboard interface and interrupt. |
@@ -895,6 +910,12 @@ static int i8042_controller_init(void) | |||
895 | return -EIO; | 910 | return -EIO; |
896 | } | 911 | } |
897 | 912 | ||
913 | /* | ||
914 | * Flush whatever accumulated while we were disabling keyboard port. | ||
915 | */ | ||
916 | |||
917 | i8042_flush(); | ||
918 | |||
898 | return 0; | 919 | return 0; |
899 | } | 920 | } |
900 | 921 | ||
@@ -914,7 +935,7 @@ static void i8042_controller_reset(void) | |||
914 | i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS; | 935 | i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS; |
915 | i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT); | 936 | i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT); |
916 | 937 | ||
917 | if (i8042_command(&i8042_initial_ctr, I8042_CMD_CTL_WCTR)) | 938 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) |
918 | printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n"); | 939 | printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n"); |
919 | 940 | ||
920 | /* | 941 | /* |