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

Merge branch 'next' into for-linus

+121 -43
+6 -8
drivers/input/gameport/gameport.c
··· 50 50 51 51 static struct bus_type gameport_bus; 52 52 53 - static void gameport_add_driver(struct gameport_driver *drv); 54 53 static void gameport_add_port(struct gameport *gameport); 55 - static void gameport_destroy_port(struct gameport *gameport); 54 + static void gameport_attach_driver(struct gameport_driver *drv); 56 55 static void gameport_reconnect_port(struct gameport *gameport); 57 56 static void gameport_disconnect_port(struct gameport *gameport); 58 57 ··· 229 230 230 231 enum gameport_event_type { 231 232 GAMEPORT_REGISTER_PORT, 232 - GAMEPORT_REGISTER_DRIVER, 233 233 GAMEPORT_ATTACH_DRIVER, 234 234 }; 235 235 ··· 372 374 gameport_add_port(event->object); 373 375 break; 374 376 375 - case GAMEPORT_REGISTER_DRIVER: 376 - gameport_add_driver(event->object); 377 + case GAMEPORT_ATTACH_DRIVER: 378 + gameport_attach_driver(event->object); 377 379 break; 378 380 379 381 default: ··· 704 706 return 0; 705 707 } 706 708 707 - static void gameport_add_driver(struct gameport_driver *drv) 709 + static void gameport_attach_driver(struct gameport_driver *drv) 708 710 { 709 711 int error; 710 712 711 - error = driver_register(&drv->driver); 713 + error = driver_attach(&drv->driver); 712 714 if (error) 713 715 printk(KERN_ERR 714 - "gameport: driver_register() failed for %s, error: %d\n", 716 + "gameport: driver_attach() failed for %s, error: %d\n", 715 717 drv->driver.name, error); 716 718 } 717 719
-1
drivers/input/input.c
··· 1549 1549 return error; 1550 1550 list_add_tail_rcu(&handle->d_node, &dev->h_list); 1551 1551 mutex_unlock(&dev->mutex); 1552 - synchronize_rcu(); 1553 1552 1554 1553 /* 1555 1554 * Since we are supposed to be called from ->connect()
+19 -1
drivers/input/keyboard/atkbd.c
··· 880 880 }; 881 881 882 882 /* 883 - * Samsung NC10 with Fn+F? key release not working 883 + * Samsung NC10,NC20 with Fn+F? key release not working 884 884 */ 885 885 static unsigned int atkbd_samsung_forced_release_keys[] = { 886 886 0x82, 0x83, 0x84, 0x86, 0x88, 0x89, 0xb3, 0xf7, 0xf9, -1U ··· 1529 1529 .matches = { 1530 1530 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 1531 1531 DMI_MATCH(DMI_PRODUCT_NAME, "NC10"), 1532 + }, 1533 + .callback = atkbd_setup_forced_release, 1534 + .driver_data = atkbd_samsung_forced_release_keys, 1535 + }, 1536 + { 1537 + .ident = "Samsung NC20", 1538 + .matches = { 1539 + DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 1540 + DMI_MATCH(DMI_PRODUCT_NAME, "NC20"), 1541 + }, 1542 + .callback = atkbd_setup_forced_release, 1543 + .driver_data = atkbd_samsung_forced_release_keys, 1544 + }, 1545 + { 1546 + .ident = "Samsung SQ45S70S", 1547 + .matches = { 1548 + DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 1549 + DMI_MATCH(DMI_PRODUCT_NAME, "SQ45S70S"), 1532 1550 }, 1533 1551 .callback = atkbd_setup_forced_release, 1534 1552 .driver_data = atkbd_samsung_forced_release_keys,
+1 -1
drivers/input/keyboard/bf54x-keys.c
··· 252 252 } 253 253 254 254 error = request_irq(bf54x_kpad->irq, bfin_kpad_isr, 255 - IRQF_SAMPLE_RANDOM, DRV_NAME, pdev); 255 + 0, DRV_NAME, pdev); 256 256 if (error) { 257 257 printk(KERN_ERR DRV_NAME 258 258 ": unable to claim irq %d; error %d\n",
+1 -1
drivers/input/misc/Kconfig
··· 214 214 215 215 config HP_SDC_RTC 216 216 tristate "HP SDC Real Time Clock" 217 - depends on GSC || HP300 217 + depends on (GSC || HP300) && SERIO 218 218 select HP_SDC 219 219 help 220 220 Say Y here if you want to support the built-in real time clock
-1
drivers/input/mouse/pc110pad.c
··· 108 108 */ 109 109 static int __init pc110pad_init(void) 110 110 { 111 - struct pci_dev *dev; 112 111 int err; 113 112 114 113 if (!no_pci_devices())
+28
drivers/input/serio/i8042-x86ia64io.h
··· 377 377 { } 378 378 }; 379 379 380 + static struct dmi_system_id __initdata i8042_dmi_reset_table[] = { 381 + { 382 + .ident = "MSI Wind U-100", 383 + .matches = { 384 + DMI_MATCH(DMI_BOARD_NAME, "U-100"), 385 + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), 386 + }, 387 + }, 388 + { 389 + .ident = "LG Electronics X110", 390 + .matches = { 391 + DMI_MATCH(DMI_BOARD_NAME, "X110"), 392 + DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), 393 + }, 394 + }, 395 + { } 396 + }; 397 + 380 398 #ifdef CONFIG_PNP 381 399 static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { 382 400 { ··· 402 384 .matches = { 403 385 DMI_MATCH(DMI_BOARD_NAME, "D845PESV"), 404 386 DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), 387 + }, 388 + }, 389 + { 390 + .ident = "MSI Wind U-100", 391 + .matches = { 392 + DMI_MATCH(DMI_BOARD_NAME, "U-100"), 393 + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), 405 394 }, 406 395 }, 407 396 { } ··· 723 698 #endif 724 699 725 700 #ifdef CONFIG_X86 701 + if (dmi_check_system(i8042_dmi_reset_table)) 702 + i8042_reset = 1; 703 + 726 704 if (dmi_check_system(i8042_dmi_noloop_table)) 727 705 i8042_noloop = 1; 728 706
+29 -8
drivers/input/serio/i8042.c
··· 712 712 static int i8042_controller_selftest(void) 713 713 { 714 714 unsigned char param; 715 + int i = 0; 715 716 716 717 if (!i8042_reset) 717 718 return 0; 718 719 719 - if (i8042_command(&param, I8042_CMD_CTL_TEST)) { 720 - printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); 721 - return -ENODEV; 722 - } 720 + /* 721 + * We try this 5 times; on some really fragile systems this does not 722 + * take the first time... 723 + */ 724 + do { 723 725 724 - if (param != I8042_RET_CTL_TEST) { 726 + if (i8042_command(&param, I8042_CMD_CTL_TEST)) { 727 + printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); 728 + return -ENODEV; 729 + } 730 + 731 + if (param == I8042_RET_CTL_TEST) 732 + return 0; 733 + 725 734 printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n", 726 - param, I8042_RET_CTL_TEST); 727 - return -EIO; 728 - } 735 + param, I8042_RET_CTL_TEST); 736 + msleep(50); 737 + } while (i++ < 5); 729 738 739 + #ifdef CONFIG_X86 740 + /* 741 + * On x86, we don't fail entire i8042 initialization if controller 742 + * reset fails in hopes that keyboard port will still be functional 743 + * and user will still get a working keyboard. This is especially 744 + * important on netbooks. On other arches we trust hardware more. 745 + */ 746 + printk(KERN_INFO 747 + "i8042: giving up on controller selftest, continuing anyway...\n"); 730 748 return 0; 749 + #else 750 + return -EIO; 751 + #endif 731 752 } 732 753 733 754 /*
+2 -2
drivers/input/touchscreen/ad7877.c
··· 736 736 737 737 /* Request AD7877 /DAV GPIO interrupt */ 738 738 739 - err = request_irq(spi->irq, ad7877_irq, IRQF_TRIGGER_FALLING | 740 - IRQF_SAMPLE_RANDOM, spi->dev.driver->name, ts); 739 + err = request_irq(spi->irq, ad7877_irq, IRQF_TRIGGER_FALLING, 740 + spi->dev.driver->name, ts); 741 741 if (err) { 742 742 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); 743 743 goto err_free_mem;
+1 -2
drivers/input/touchscreen/ad7879.c
··· 448 448 ad7879_setup(ts); 449 449 450 450 err = request_irq(bus->irq, ad7879_irq, 451 - IRQF_TRIGGER_FALLING | IRQF_SAMPLE_RANDOM, 452 - bus->dev.driver->name, ts); 451 + IRQF_TRIGGER_FALLING, bus->dev.driver->name, ts); 453 452 454 453 if (err) { 455 454 dev_err(&bus->dev, "irq %d busy?\n", bus->irq);
+11 -1
drivers/input/touchscreen/ads7846.c
··· 127 127 void (*filter_cleanup)(void *data); 128 128 int (*get_pendown_state)(void); 129 129 int gpio_pendown; 130 + 131 + void (*wait_for_sync)(void); 130 132 }; 131 133 132 134 /* leave chip selected when we're done, for quicker re-select? */ ··· 513 511 return !gpio_get_value(ts->gpio_pendown); 514 512 } 515 513 514 + static void null_wait_for_sync(void) 515 + { 516 + } 517 + 516 518 /* 517 519 * PENIRQ only kicks the timer. The timer only reissues the SPI transfer, 518 520 * to retrieve touchscreen status. ··· 692 686 default: 693 687 BUG(); 694 688 } 689 + ts->wait_for_sync(); 695 690 status = spi_async(ts->spi, m); 696 691 if (status) 697 692 dev_err(&ts->spi->dev, "spi_async --> %d\n", ··· 730 723 } else { 731 724 /* pen is still down, continue with the measurement */ 732 725 ts->msg_idx = 0; 726 + ts->wait_for_sync(); 733 727 status = spi_async(ts->spi, &ts->msg[0]); 734 728 if (status) 735 729 dev_err(&ts->spi->dev, "spi_async --> %d\n", status); ··· 754 746 * that here. (The "generic irq" framework may help...) 755 747 */ 756 748 ts->irq_disabled = 1; 757 - disable_irq(ts->spi->irq); 749 + disable_irq_nosync(ts->spi->irq); 758 750 ts->pending = 1; 759 751 hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_DELAY), 760 752 HRTIMER_MODE_REL); ··· 954 946 if (pdata->penirq_recheck_delay_usecs) 955 947 ts->penirq_recheck_delay_usecs = 956 948 pdata->penirq_recheck_delay_usecs; 949 + 950 + ts->wait_for_sync = pdata->wait_for_sync ? : null_wait_for_sync; 957 951 958 952 snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&spi->dev)); 959 953
+18 -11
drivers/input/touchscreen/da9034-ts.c
··· 3 3 * 4 4 * Copyright (C) 2006-2008 Marvell International Ltd. 5 5 * Fengwei Yin <fengwei.yin@marvell.com> 6 + * Bin Yang <bin.yang@marvell.com> 6 7 * Eric Miao <eric.miao@marvell.com> 7 8 * 8 9 * This program is free software; you can redistribute it and/or modify ··· 176 175 goto err_reset; 177 176 178 177 touch->state = STATE_STOP; 178 + 179 + /* FIXME: PEN_{UP/DOWN} events are expected to be 180 + * available by stopping TSI, but this is found not 181 + * always true, delay and simulate such an event 182 + * here is more reliable 183 + */ 184 + mdelay(1); 185 + da9034_event_handler(touch, 186 + is_pen_down(touch) ? EVENT_PEN_DOWN : 187 + EVENT_PEN_UP); 179 188 break; 180 189 181 190 case STATE_STOP: ··· 200 189 report_pen_up(touch); 201 190 touch->state = STATE_IDLE; 202 191 } 203 - 204 - input_sync(touch->input_dev); 205 192 break; 206 193 207 194 case STATE_WAIT: ··· 209 200 if (is_pen_down(touch)) { 210 201 start_tsi(touch); 211 202 touch->state = STATE_BUSY; 212 - } else 203 + } else { 204 + report_pen_up(touch); 213 205 touch->state = STATE_IDLE; 206 + } 214 207 break; 215 208 } 216 209 return; ··· 237 226 struct da9034_touch *touch = 238 227 container_of(nb, struct da9034_touch, notifier); 239 228 240 - if (event & DA9034_EVENT_PEN_DOWN) { 241 - if (is_pen_down(touch)) 242 - da9034_event_handler(touch, EVENT_PEN_DOWN); 243 - else 244 - da9034_event_handler(touch, EVENT_PEN_UP); 245 - } 246 - 247 229 if (event & DA9034_EVENT_TSI_READY) 248 230 da9034_event_handler(touch, EVENT_TSI_READY); 231 + 232 + if ((event & DA9034_EVENT_PEN_DOWN) && touch->state == STATE_IDLE) 233 + da9034_event_handler(touch, EVENT_PEN_DOWN); 249 234 250 235 return 0; 251 236 } ··· 392 385 module_exit(da9034_touch_exit); 393 386 394 387 MODULE_DESCRIPTION("Touchscreen driver for Dialog Semiconductor DA9034"); 395 - MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); 388 + MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>, Bin Yang <bin.yang@marvell.com>"); 396 389 MODULE_LICENSE("GPL"); 397 390 MODULE_ALIAS("platform:da9034-touch");
+3 -4
drivers/input/touchscreen/mainstone-wm97xx.c
··· 111 111 #else 112 112 static void wm97xx_acc_pen_up(struct wm97xx *wm) 113 113 { 114 - int count = 16; 114 + unsigned int count; 115 + 115 116 schedule_timeout_uninterruptible(1); 116 117 117 - while (count < 16) { 118 + for (count = 0; count < 16; count++) 118 119 MODR; 119 - count--; 120 - } 121 120 } 122 121 #endif 123 122
+1 -2
drivers/input/touchscreen/wm97xx-core.c
··· 370 370 * provided. */ 371 371 BUG_ON(!wm->mach_ops->irq_enable); 372 372 373 - if (request_irq(wm->pen_irq, wm97xx_pen_interrupt, 374 - IRQF_SHARED | IRQF_SAMPLE_RANDOM, 373 + if (request_irq(wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED, 375 374 "wm97xx-pen", wm)) { 376 375 dev_err(wm->dev, 377 376 "Failed to register pen down interrupt, polling");
+1
include/linux/spi/ads7846.h
··· 51 51 void **filter_data); 52 52 int (*filter) (void *filter_data, int data_idx, int *val); 53 53 void (*filter_cleanup)(void *filter_data); 54 + void (*wait_for_sync)(void); 54 55 }; 55 56