aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:20:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:20:35 -0500
commitfebb187761b02fce7d61b9c897d0e701f672b5ee (patch)
treea953d8a59f7f7fd7bb34466143a8f3722e14e479 /drivers/input
parent8c27eba54970c6ebbb408186e5baa2274435e869 (diff)
parent35baef2afb6270ff731b4d766f0b163c3912304f (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: adds the context menu key (HUT GenDesc 0x84) Input: add definitions for frame forward and frame back keys Input: bf54x-keys - keypad does not exist on BF544 parts Input: gpio-keys - request and configure GPIOs Input: i8042 - add i8042.noloop quirk for MS Virtual Machine Sonypi: use synchronize_irq instead of sycnronize_sched sonypi: fit input devices into sysfs tree sony-laptop: fit input devices into sysfs tree
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/Kconfig2
-rw-r--r--drivers/input/keyboard/gpio_keys.c38
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h8
3 files changed, 37 insertions, 11 deletions
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 2316a018fae6..dfa6592c10f6 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -286,7 +286,7 @@ config KEYBOARD_MAPLE
286 286
287config KEYBOARD_BFIN 287config KEYBOARD_BFIN
288 tristate "Blackfin BF54x keypad support" 288 tristate "Blackfin BF54x keypad support"
289 depends on BF54x 289 depends on (BF54x && !BF544)
290 help 290 help
291 Say Y here if you want to use the BF54x keypad. 291 Say Y here if you want to use the BF54x keypad.
292 292
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 3eddf52a0bba..6a9ca4bdcb74 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -75,16 +75,32 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
75 75
76 for (i = 0; i < pdata->nbuttons; i++) { 76 for (i = 0; i < pdata->nbuttons; i++) {
77 struct gpio_keys_button *button = &pdata->buttons[i]; 77 struct gpio_keys_button *button = &pdata->buttons[i];
78 int irq = gpio_to_irq(button->gpio); 78 int irq;
79 unsigned int type = button->type ?: EV_KEY; 79 unsigned int type = button->type ?: EV_KEY;
80 80
81 error = gpio_request(button->gpio, button->desc ?: "gpio_keys");
82 if (error < 0) {
83 pr_err("gpio-keys: failed to request GPIO %d,"
84 " error %d\n", button->gpio, error);
85 goto fail;
86 }
87
88 error = gpio_direction_input(button->gpio);
89 if (error < 0) {
90 pr_err("gpio-keys: failed to configure input"
91 " direction for GPIO %d, error %d\n",
92 button->gpio, error);
93 gpio_free(button->gpio);
94 goto fail;
95 }
96
97 irq = gpio_to_irq(button->gpio);
81 if (irq < 0) { 98 if (irq < 0) {
82 error = irq; 99 error = irq;
83 printk(KERN_ERR 100 pr_err("gpio-keys: Unable to get irq number"
84 "gpio-keys: " 101 " for GPIO %d, error %d\n",
85 "Unable to get irq number for GPIO %d,"
86 "error %d\n",
87 button->gpio, error); 102 button->gpio, error);
103 gpio_free(button->gpio);
88 goto fail; 104 goto fail;
89 } 105 }
90 106
@@ -94,9 +110,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
94 button->desc ? button->desc : "gpio_keys", 110 button->desc ? button->desc : "gpio_keys",
95 pdev); 111 pdev);
96 if (error) { 112 if (error) {
97 printk(KERN_ERR 113 pr_err("gpio-keys: Unable to claim irq %d; error %d\n",
98 "gpio-keys: Unable to claim irq %d; error %d\n",
99 irq, error); 114 irq, error);
115 gpio_free(button->gpio);
100 goto fail; 116 goto fail;
101 } 117 }
102 118
@@ -108,8 +124,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
108 124
109 error = input_register_device(input); 125 error = input_register_device(input);
110 if (error) { 126 if (error) {
111 printk(KERN_ERR 127 pr_err("gpio-keys: Unable to register input device, "
112 "gpio-keys: Unable to register input device, "
113 "error: %d\n", error); 128 "error: %d\n", error);
114 goto fail; 129 goto fail;
115 } 130 }
@@ -119,8 +134,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
119 return 0; 134 return 0;
120 135
121 fail: 136 fail:
122 while (--i >= 0) 137 while (--i >= 0) {
123 free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev); 138 free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev);
139 gpio_free(pdata->buttons[i].gpio);
140 }
124 141
125 platform_set_drvdata(pdev, NULL); 142 platform_set_drvdata(pdev, NULL);
126 input_free_device(input); 143 input_free_device(input);
@@ -139,6 +156,7 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev)
139 for (i = 0; i < pdata->nbuttons; i++) { 156 for (i = 0; i < pdata->nbuttons; i++) {
140 int irq = gpio_to_irq(pdata->buttons[i].gpio); 157 int irq = gpio_to_irq(pdata->buttons[i].gpio);
141 free_irq(irq, pdev); 158 free_irq(irq, pdev);
159 gpio_free(pdata->buttons[i].gpio);
142 } 160 }
143 161
144 input_unregister_device(input); 162 input_unregister_device(input);
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index f8fe42148093..c5e68dcd88ac 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -110,6 +110,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
110 DMI_MATCH(DMI_PRODUCT_VERSION, "5a"), 110 DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
111 }, 111 },
112 }, 112 },
113 {
114 .ident = "Microsoft Virtual Machine",
115 .matches = {
116 DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
117 DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
118 DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
119 },
120 },
113 { } 121 { }
114}; 122};
115 123