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

Merge branch 'for-linus' into next

Bring in changes to ads7846 to avoid mereg conflicts.

+34 -19
+20 -14
arch/arm/mach-omap2/common-board-devices.c
··· 64 64 struct spi_board_info *spi_bi = &ads7846_spi_board_info; 65 65 int err; 66 66 67 - err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); 68 - if (err) { 69 - pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); 70 - return; 71 - } 67 + /* 68 + * If a board defines get_pendown_state() function, request the pendown 69 + * GPIO and set the GPIO debounce time. 70 + * If a board does not define the get_pendown_state() function, then 71 + * the ads7846 driver will setup the pendown GPIO itself. 72 + */ 73 + if (board_pdata && board_pdata->get_pendown_state) { 74 + err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); 75 + if (err) { 76 + pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); 77 + return; 78 + } 72 79 73 - if (gpio_debounce) 74 - gpio_set_debounce(gpio_pendown, gpio_debounce); 80 + if (gpio_debounce) 81 + gpio_set_debounce(gpio_pendown, gpio_debounce); 82 + 83 + gpio_export(gpio_pendown, 0); 84 + } 75 85 76 86 spi_bi->bus_num = bus_num; 77 87 spi_bi->irq = gpio_to_irq(gpio_pendown); 78 88 89 + ads7846_config.gpio_pendown = gpio_pendown; 90 + 79 91 if (board_pdata) { 80 92 board_pdata->gpio_pendown = gpio_pendown; 93 + board_pdata->gpio_pendown_debounce = gpio_debounce; 81 94 spi_bi->platform_data = board_pdata; 82 - if (board_pdata->get_pendown_state) 83 - gpio_export(gpio_pendown, 0); 84 - } else { 85 - ads7846_config.gpio_pendown = gpio_pendown; 86 95 } 87 - 88 - if (!board_pdata || (board_pdata && !board_pdata->get_pendown_state)) 89 - gpio_free(gpio_pendown); 90 96 91 97 spi_register_board_info(&ads7846_spi_board_info, 1); 92 98 }
+4
drivers/input/input-mt.c
··· 26 26 * input_mt_init_slots() - initialize MT input slots 27 27 * @dev: input device supporting MT events and finger tracking 28 28 * @num_slots: number of slots used by the device 29 + * @flags: mt tasks to handle in core 29 30 * 30 31 * This function allocates all necessary memory for MT slot handling 31 32 * in the input device, prepares the ABS_MT_SLOT and 32 33 * ABS_MT_TRACKING_ID events for use and sets up appropriate buffers. 34 + * Depending on the flags set, it also performs pointer emulation and 35 + * frame synchronization. 36 + * 33 37 * May be called repeatedly. Returns -EINVAL if attempting to 34 38 * reinitialize with a different number of slots. 35 39 */
+2 -2
drivers/input/mousedev.c
··· 12 12 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 13 13 14 14 #define MOUSEDEV_MINOR_BASE 32 15 - #define MOUSEDEV_MINORS 32 16 - #define MOUSEDEV_MIX 31 15 + #define MOUSEDEV_MINORS 31 16 + #define MOUSEDEV_MIX 63 17 17 18 18 #include <linux/sched.h> 19 19 #include <linux/slab.h>
+5 -1
drivers/input/touchscreen/ads7846.c
··· 955 955 956 956 static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume); 957 957 958 - static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads7846 *ts) 958 + static int __devinit ads7846_setup_pendown(struct spi_device *spi, 959 + struct ads7846 *ts) 959 960 { 960 961 struct ads7846_platform_data *pdata = spi->dev.platform_data; 961 962 int err; ··· 982 981 983 982 ts->gpio_pendown = pdata->gpio_pendown; 984 983 984 + if (pdata->gpio_pendown_debounce) 985 + gpio_set_debounce(pdata->gpio_pendown, 986 + pdata->gpio_pendown_debounce); 985 987 } else { 986 988 dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n"); 987 989 return -EINVAL;
+3 -2
include/linux/spi/ads7846.h
··· 46 46 u16 debounce_rep; /* additional consecutive good readings 47 47 * required after the first two */ 48 48 int gpio_pendown; /* the GPIO used to decide the pendown 49 - * state if get_pendown_state == NULL 50 - */ 49 + * state if get_pendown_state == NULL */ 50 + int gpio_pendown_debounce; /* platform specific debounce time for 51 + * the gpio_pendown */ 51 52 int (*get_pendown_state)(void); 52 53 int (*filter_init) (const struct ads7846_platform_data *pdata, 53 54 void **filter_data);