aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/char/sonypi.c8
-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
-rw-r--r--drivers/misc/sony-laptop.c10
5 files changed, 48 insertions, 18 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 877e53dcb996..921c6d2bc8fc 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_driver = {
1163}; 1163};
1164#endif 1164#endif
1165 1165
1166static int __devinit sonypi_create_input_devices(void) 1166static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
1167{ 1167{
1168 struct input_dev *jog_dev; 1168 struct input_dev *jog_dev;
1169 struct input_dev *key_dev; 1169 struct input_dev *key_dev;
@@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input_devices(void)
1177 jog_dev->name = "Sony Vaio Jogdial"; 1177 jog_dev->name = "Sony Vaio Jogdial";
1178 jog_dev->id.bustype = BUS_ISA; 1178 jog_dev->id.bustype = BUS_ISA;
1179 jog_dev->id.vendor = PCI_VENDOR_ID_SONY; 1179 jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
1180 jog_dev->dev.parent = &pdev->dev;
1180 1181
1181 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); 1182 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
1182 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); 1183 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
@@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input_devices(void)
1191 key_dev->name = "Sony Vaio Keys"; 1192 key_dev->name = "Sony Vaio Keys";
1192 key_dev->id.bustype = BUS_ISA; 1193 key_dev->id.bustype = BUS_ISA;
1193 key_dev->id.vendor = PCI_VENDOR_ID_SONY; 1194 key_dev->id.vendor = PCI_VENDOR_ID_SONY;
1195 key_dev->dev.parent = &pdev->dev;
1194 1196
1195 /* Initialize the Input Drivers: special keys */ 1197 /* Initialize the Input Drivers: special keys */
1196 key_dev->evbit[0] = BIT_MASK(EV_KEY); 1198 key_dev->evbit[0] = BIT_MASK(EV_KEY);
@@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct platform_device *dev)
1385 1387
1386 if (useinput) { 1388 if (useinput) {
1387 1389
1388 error = sonypi_create_input_devices(); 1390 error = sonypi_create_input_devices(dev);
1389 if (error) { 1391 if (error) {
1390 printk(KERN_ERR 1392 printk(KERN_ERR
1391 "sonypi: failed to create input devices\n"); 1393 "sonypi: failed to create input devices\n");
@@ -1432,7 +1434,7 @@ static int __devexit sonypi_remove(struct platform_device *dev)
1432{ 1434{
1433 sonypi_disable(); 1435 sonypi_disable();
1434 1436
1435 synchronize_sched(); /* Allow sonypi interrupt to complete. */ 1437 synchronize_irq(sonypi_device.irq);
1436 flush_scheduled_work(); 1438 flush_scheduled_work();
1437 1439
1438 if (useinput) { 1440 if (useinput) {
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
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index bb13858f60a1..b0f68031b49d 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -338,7 +338,7 @@ static void sony_laptop_report_input_event(u8 event)
338 dprintk("unknown input event %.2x\n", event); 338 dprintk("unknown input event %.2x\n", event);
339} 339}
340 340
341static int sony_laptop_setup_input(void) 341static int sony_laptop_setup_input(struct acpi_device *acpi_device)
342{ 342{
343 struct input_dev *jog_dev; 343 struct input_dev *jog_dev;
344 struct input_dev *key_dev; 344 struct input_dev *key_dev;
@@ -379,6 +379,7 @@ static int sony_laptop_setup_input(void)
379 key_dev->name = "Sony Vaio Keys"; 379 key_dev->name = "Sony Vaio Keys";
380 key_dev->id.bustype = BUS_ISA; 380 key_dev->id.bustype = BUS_ISA;
381 key_dev->id.vendor = PCI_VENDOR_ID_SONY; 381 key_dev->id.vendor = PCI_VENDOR_ID_SONY;
382 key_dev->dev.parent = &acpi_device->dev;
382 383
383 /* Initialize the Input Drivers: special keys */ 384 /* Initialize the Input Drivers: special keys */
384 set_bit(EV_KEY, key_dev->evbit); 385 set_bit(EV_KEY, key_dev->evbit);
@@ -410,6 +411,7 @@ static int sony_laptop_setup_input(void)
410 jog_dev->name = "Sony Vaio Jogdial"; 411 jog_dev->name = "Sony Vaio Jogdial";
411 jog_dev->id.bustype = BUS_ISA; 412 jog_dev->id.bustype = BUS_ISA;
412 jog_dev->id.vendor = PCI_VENDOR_ID_SONY; 413 jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
414 key_dev->dev.parent = &acpi_device->dev;
413 415
414 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); 416 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
415 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); 417 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
@@ -1006,7 +1008,7 @@ static int sony_nc_add(struct acpi_device *device)
1006 } 1008 }
1007 1009
1008 /* setup input devices and helper fifo */ 1010 /* setup input devices and helper fifo */
1009 result = sony_laptop_setup_input(); 1011 result = sony_laptop_setup_input(device);
1010 if (result) { 1012 if (result) {
1011 printk(KERN_ERR DRV_PFX 1013 printk(KERN_ERR DRV_PFX
1012 "Unabe to create input devices.\n"); 1014 "Unabe to create input devices.\n");
@@ -1034,7 +1036,7 @@ static int sony_nc_add(struct acpi_device *device)
1034 sony_backlight_device->props.brightness = 1036 sony_backlight_device->props.brightness =
1035 sony_backlight_get_brightness 1037 sony_backlight_get_brightness
1036 (sony_backlight_device); 1038 (sony_backlight_device);
1037 sony_backlight_device->props.max_brightness = 1039 sony_backlight_device->props.max_brightness =
1038 SONY_MAX_BRIGHTNESS - 1; 1040 SONY_MAX_BRIGHTNESS - 1;
1039 } 1041 }
1040 1042
@@ -2453,7 +2455,7 @@ static int sony_pic_add(struct acpi_device *device)
2453 } 2455 }
2454 2456
2455 /* setup input devices and helper fifo */ 2457 /* setup input devices and helper fifo */
2456 result = sony_laptop_setup_input(); 2458 result = sony_laptop_setup_input(device);
2457 if (result) { 2459 if (result) {
2458 printk(KERN_ERR DRV_PFX 2460 printk(KERN_ERR DRV_PFX
2459 "Unabe to create input devices.\n"); 2461 "Unabe to create input devices.\n");